Entity Framework on different database

浪子不回头ぞ 提交于 2019-12-23 04:31:10

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!