简体   繁体   English

使用Entity Framework将数据库从SQL Server切换到Oracle需要进行哪些更改?

[英]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.

相关问题 单个实体框架中具有相同模式的Oracle和SQL Server数据库 - Oracle and SQL Server database with same schema in single Entity Framework 使用Entity Framework保存对SQL Server数据库的更改时,一个或多个实体的验证失败 - Validation failed for one or more entities while saving changes to SQL Server Database using Entity Framework 使用代码优先迁移的Entity Framework从SQL Server到Oracle - From SQL Server to Oracle using Entity Framework with code-first Migrations 如何使用SQL Server和Entity Framework模仿序列的使用(来自Oracle) - How to mimic the use of sequences (from Oracle) using SQL Server and Entity Framework 使用Entity Framework保存1条记录的更改正在更新数据库中的2条记录 - Saving changes from 1 record using Entity Framework is updating 2 records in database 无法在Oracle数据库的实体框架中生成SQL - Cannot generate sql in entity framework for oracle database 使用实体框架从oracle数据库中删除记录 - deleting record from oracle database using entity framework 在SQL Server 2012中使用实体框架(本地* .mdf数据库) - Using Entity framework with SQL Server 2012 (local *.mdf database) 使用实体框架的SQL Server 2012的数据库资源管理器工具 - Database explorer tool for SQL Server 2012 using Entity Framework 使用实体框架将表从SQL Server数据库中提取到C#中的List &lt;&gt;中 - Pulling a table from a SQL Server database into a List<> in C# using Entity Framework
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM