0

First of all, I'm an Entity Framework n00b and I can clearly see the advantages of Entity Framework.

I'm wondering how one would handle the following hypothetical situations.

  1. The existing situation is that an application is developed using Entity Framework targeted at one DBMS (e.g. MySQL). At some point in time for some valid reason it is necessary to migrate to another DBMS (e.g. SQL Server).

  2. An application needs to be deployable at different clients against different DBMSs. It should be possible to deploy the application at one client against e.g. SQL Server. The same application needs to be deployed at another client against e.g. PostgreSQL.

In both situations database structure over the different DBMSs will largely be the same, possibly slightly different table- and/or columnnames.

Is it possible through Entity Framework? Or perhaps another ORM?
If possible can anyone show me how in a small code example? Or point me to one somewhere on the net?

1

1 Answer 1

1

You can specify multiple providers in your config. If you want to target a DBMS which is not supported or if there is no connector available, you have to write another implementation of your DataLayer. If you access your DataLayer through an interface in the rest of your application, it should work.

I have done this with Sql Server and Sql Server CE, but I have no idea about PostgreSQL.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.