问题
I have a project which uses entity framework. We map a mssql db with entity framework. Now we want to change mssql db to oracle db. But I don't want to change my model of db in entity framework. Two dbs are same tables columns etc. only difference is their technologies(mssql and oracle) and some of the column data types.In mssql we use bigint instead of number in oracle. Is it possible to use same model with difference dbs which have same tables on Entity framework?
回答1:
The provider model with EF allows support for a variety of databases. I believe this includes oracle however I haven't ever used it personally.
I can tell you that when switching between database providers the connection string is normally the only change required. The only time i think you would have to change anything at all in your database is if the provider didn't support a specific operation you are using.
来源:https://stackoverflow.com/questions/12507618/entity-framework-on-different-database