[英]What changes are needed to switch database from SQL Server to Oracle using Entity Framework?
I have developed a MVC web application using Entity Framework with SQL Server as backend. 我使用Entity Framework和SQL Server作为后端开发了一个MVC Web应用程序。 I have used a database-first approach.
我使用了数据库优先的方法。
Now my client wants to switch to an Oracle database. 现在我的客户想要切换到Oracle数据库。 I am in the process of doing impact analysis of switching from SQL Server to Oracle database.
我正在进行从SQL Server切换到Oracle数据库的影响分析。 My client believes that it is as simple as changing connection string.
我的客户认为它就像更改连接字符串一样简单。
My question is, considering the fact that the table name, table structure, relationships and attributes are all same with SQL Server database, what changes do I need to do in my project to switch from MS SQL to Oracle? 我的问题是,考虑到表名,表结构,关系和属性与SQL Server数据库完全相同的事实,我在项目中需要做哪些更改才能从MS SQL切换到Oracle?
Do I need to create a new edmx
file for Oracle database or do I only need to change the connection string and use the same context? 我是否需要为Oracle数据库创建新的
edmx
文件,或者我是否只需要更改连接字符串并使用相同的上下文?
Also if in future this needs to be reversed, then is there a good practice or solution to support both the databases? 此外,如果将来需要逆转,那么是否有一个良好的实践或解决方案来支持这两个数据库?
Thank you. 谢谢。
oracle has a 30 character limit for item (table, index, column) so if you are verbose in any of your naming you are going to have to rename a bunch of items. 对于项目(表,索引,列),oracle有30个字符的限制,因此如果您在任何命名中都很详细,那么您将不得不重命名一堆项目。
i don't like using an edmx. 我不喜欢使用edmx。 it might be easier with code first models.
使用代码优先模型可能会更容易。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.