实体框架数据库,先用Oracle数据库 [英] Entity Framework Database-First with Oracle Database

查看:165
本文介绍了实体框架数据库,先用Oracle数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发了实体Framewrok数据库,首先一个ASP.NET应用程序的WebForms与SQL Server连接,我想同样的实体数据模型与Oracle数据库连接。

I'm developed an ASP.NET WebForms application with Entity Framewrok Database-First connected with SQL Server, and I want to connect the same Entity Data Model with Oracle Database.

我的担忧是:


  • 如何到我的开发机器上安装Oracle数据库引擎来测试

  • 如何将数据模型与Oracle的而不是SQL Server?

  • 连接
  • 如何产生相同的架构到Oracle?

  • 是否有驱动程序,工具或应用程序我需要安装来实现这一目标?

  • How to install Oracle Database Engine on my dev machine to test?
  • How to connect the data model with Oracle instead of SQL Server?
  • How to generate the same schema into Oracle?
  • Are there drivers, tools, or apps I need to install to make this happen?

推荐答案

我做的完全一样的你。

即转换SQL服务器到Oracle在ASP.NET MVC应用程序。

i.e. Converting a ASP.NET MVC application on SQL server to Oracle.

由于您的应用程序已经在运行,你可以做的,就是

Since your application is already running, what you can do, is


  1. 生成SQL Server数据库创建脚本,

  2. 在Oracle中创建相同的表。


  3. 安装ODP.NET的此处
    这样可以让你从.NET应用程序连接到Oracle。

  4. 现在,创建一个从Oracle中的表的新 EDMX 文件,如果你正确地做
    一切,你的应用程序应该是。运行

  1. generate create scripts from your SQL Server database,
  2. create the same tables in Oracle.
  3. Install ODP.NET from here. This will allow you to connect to Oracle from a .NET application.
  4. Now create a new edmx file from the tables in Oracle and if you do everything properly, your application should be running.

请注意:如果你有一个VS许可证ODP.NET提供商才可见。这是不是在免费版本中可见。

Note: ODP.NET provider is only visible if you have a VS license. It is not visible on the free version.

这篇关于实体框架数据库,先用Oracle数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆