I have conceptual (domain) model which is implemented in different ways in separate databases. For example, inheritance in first db is table per type, second - concrete types are tables, and third - all types properties are merged in one table. Something similar to this: Mapping objects to relational databases
Also, i have two different data access layers (for now) - first is using Entity Framework 5 - Database first approach, and second is ADO.NET dynicamic DAL where i have my DB command factory.
Client application will use these databases and client should choose on startup:
- database to connect (connection string) and
- data access layer (EF or classic ADO.NET) to consume data.
Depending on client's selection, system should use specified database, and selected DAL.
My questions are:
- How can i manage Entity Framework to do a different (dynamicly) mapping details depending on connection string (First connection string - three tables, second two, third one, etc) and mapp them to the same entities?
- Is there something else that i should pay attention to, from your experience?