Up Entity Data Model
DevForce Resource Center » Core concepts » Architecture » Entities » Entity Data Model » Map to multiple database vendors using the same EDM

Map to multiple database vendors using the same EDM

Last modified on August 15, 2012 17:21

The same Entity Data Model can work with databases from different vendors. For example, one customer of your application might use SQL Server, while another customer might want Oracle.

Note: this topic is different than connecting to multiple database instances simultaneously ... which is also supported by DevForce.

The mapping process

The process to do this is not trivial, but it is doable. First, the database types must be close enough that the mapping file (the MSL) can map the CSDL to the SSDL for each database. Then you just need to specify the correct MSL and SSDL for each deployment. (See Entity Data Model XML for an overview of these files.)

To be more specific, the process looks like this:

  1. Map to your primary schema and create the EDMX.
  2. Copy the EDMX and remove the MSL and SSDL portions from the file.
  3. For the other databases, create (map) the MSL and SSDL for the CSDL to get an EDMX for that schema.
  4. For each deployment, you will need to specify the correct metadata files (CSDL, MSL, SSDL) / EDMX for the specific database.

This page discusses the metadata files and some options on how to deploy them:

Created by DevForce on April 16, 2012 15:41

This wiki is licensed under a Creative Commons 2.0 license. XWiki Enterprise 3.2 - Documentation. Copyright © 2020 IdeaBlade