Oracle的实体框架兼容提供程序的比较? [英] Comparison of Entity Framework compatible providers for Oracle?

查看:658
本文介绍了Oracle的实体框架兼容提供程序的比较?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经读过类似的问题和他们的答案,但是,似乎没有处理这个确切的问题,除了一个,这是过时的(从2009年前EF4)。



有人对Oracle的EF提供者有任何正面或负面的经验,如果有,你的经验是什么?



类似问题:

实体框架和Oracle

您可以将Microsoft Entity Framework与Oracle结合使用吗?

使用oracle数据库的实体框架

如何为.Net应用程序选择Oracle提供程序?



我知道的提供商:royalty
Oracle的ODP.NET: http://www.oracle.com/technetwork/topics/dotnet/index-085163.html

Devart的DotConnect: http://www.devart.com/dotconnect/entityframework.html

DataDirect的进度: http://www.datadirect.com/products/ net / release-history.html

OPENLINK: http:// uda .openlinksw.com / dotnet /



我知道Oracle的提供程序目前是beta(3),并且没有完全管理 - 单独的二进制文件32bit vs 64bit。



其他人是否稳定?

有没有我错过的?

解决方案

我对不同的提供商进行了快速比较,包括:


  1. 安装经验。

  2. 连接。

  3. 服务器


  4. 从数据库体验更新(数据库优先)。

  5. 数据类型映射






以下是结论:



1。安装经验。



Oracle的ODP.NET(beta 3):
复杂安装单独的x86和x64版本,安装程序不是为Windows设计的。
填充系统路径(危险地接近最大长度),不安装到标准文件夹(程序文件+ appdata)。



Devart的DotConnect:
平滑安装,提供程序DLL是完全托管的。



DataDirect的进度:
平滑安装,提供程序DLL完全托管。



OPENLINK:
似乎需要服务器端安装,没有进一步测试。



2。连接。



Oracle的ODP.NET(beta 3):
复杂的配置,需要在客户端机器上安装Oracle, Oracle安装或一个长而复杂的连接字符串,看起来像LISP / Scheme。

更新:在文档中找不到此连接字符串,但是,连接字符串也可以包含简单数据源定义serverName:port / serviceName。



Devart的DotConnect:
简单的连接字符串+向导。



DataDirect进度:
简单的连接字符串+向导。



3。服务器资源管理器体验。



Oracle的ODP.NET(beta 3):
这三种功能中最强大的功能,索引。



Devart的DotConnect:
查看表和字段。



DataDirect的进度:
允许轻松编辑,查看键和索引。



4。从数据库体验更新(数据库优先)。



Oracle的ODP.NET(beta 3):
简单。



Devart的DotConnect:
显示所有模式的表,没有过滤选项 - 使得查找表耗尽。



DataDirect的进度:
简单。



5。 Oracle的ODP.NET(beta 3):
数字类型映射(数据库第一)。



<数字(2,0)和数字(3,0)错误*。
可以手动覆盖number(2,0)和number(3,0)。修正数字(1,0)不起作用(至少不是在测试版3 - 可能在beta 2工作)。



更新: b> 现在发布版本已经发出(112030),这已经修复。
有些映射可以通过 app.config文件中的部分进行。



Devart的DotConnect:
显示所有模式的表格,没有过滤选项 -
二进制浮点,二进制双,具有时区的时间戳,数字(2,0),数字(3,0)和数字(4,0)的默认映射错误*。手动覆盖应该工作 - 未检查。



DataDirect的进度:
默认映射是OK *。



(*)我的预期映射:

 类型.NET数据类型
整数十进制
int十进制
smallint十进制
长字符串
十进制十进制
rowid字符串
float十进制
double十进制
二进制浮点数单元
二进制双double
char [40] String
charvar [40] String
natchar [40] String
natcharvar [ 40] String
natcharacter [40] String
natcharactervar [40] String
number十进制
数字十进制
nvarchar2 [40] String
实数小数
date DateTime
timestamp DateTime
timestamplocal DateTime
timestampzone DateTimeOffset
xml String
raw15 Binary
raw16 Guid
raw17 Int64
数字(1,0)布尔
数字(2,0)字节或SByte
数字(3,0)字节或SByte(也接受Int16为OK)
数字(4,0) Int16
number(5,0)Int16(也接受Int32为OK)
number(6,0)Int32
number(7,0)Int32
number(8,0) )Int32
number(9,0)Int32
number(10,0)Int32(也接受Int64为OK)
number(11,0)Int64
number(15, 0)Int64
编号(16,0)Int64
编号(17,0)Int64
编号(18,0)Int64
编号(19,0)Int64 as OK too)
number(20,0)十进制(也接受Int64为OK)
number(21 +,0)十进制

如果你希望数据库类型能够存储.NET类型范围中的任何数字,那么
IntX需要一个数字(N,0),其中Ceil log 10(2 ^ X))= N用于存储**。

  Bool(Int1)==> number(1,0)
Byte(Int8)==> number(3,0)
Int16,UInt16 ==> number(5,0)
Int32,UInt32 ==> number(10,0)
Int64 ==> number(19,0)
UInt64 ==>数字(20,0)

**计算采用无符号数字,对于有符号数字ceil ^(X-1))。



数据类型假设的参考:

TECH上的TECH

Devart

Oracle


I have read similar questions and their answers, however, it seems none deal with this exact question except for one, which is out of date (from 2009 - pre EF4).

Does anyone have any positive or negative experience with EF providers for Oracle, if so what is your experience?

Similar questions:
Entity Framework and Oracle
Can you use Microsoft Entity Framework with Oracle?
Entity framework with oracle database
How to choose an Oracle provider for .Net application?

Providers I know of:
Oracle's ODP.NET: http://www.oracle.com/technetwork/topics/dotnet/index-085163.html
Devart's DotConnect: http://www.devart.com/dotconnect/entityframework.html
DataDirect's Progress: http://www.datadirect.com/products/net/release-history.html
OPENLINK: http://uda.openlinksw.com/dotnet/

I know that Oracle's provider is currently beta (3) and is not fully managed - separate binaries for 32bit vs 64bit.

Are any of the others stable?
Are there any that I have missed?
Which have been successfully used in your projects?

解决方案

I ran a quick comparison of the different providers consisting of:

  1. Installation experience.
  2. Connectivity.
  3. Server Explorer experience.
  4. Updating from database experience (database first).
  5. Data type mappings (database first).


Here are the conclusions:

1. Installation experience.

Oracle's ODP.NET (beta 3): Complex installation of separate x86 and x64 versions, installers not designed for Windows. Fills system path (dangerously close to max length), does not install to standard folders (program files + appdata).

Devart's DotConnect: Smooth installation, provider DLL is fully managed.

DataDirect's Progress: Smooth installation, provider DLL is fully managed.

OPENLINK: Seems to require server side installation, did not test further.

2. Connectivity.

Oracle's ODP.NET (beta 3): Complicated to configure, requires Oracle installation on client machine and either additional TSN file in Oracle installation or a long and complex connection string that looks like LISP/Scheme.
Update: Couldn't find this in the documentation, however, connection string can also contain simple data source definition e.g. serverName:port/serviceName.

Devart's DotConnect: Simple connection string + wizard.

DataDirect's Progress: Simple connection string + wizard.

3. Server Explorer experience.

Oracle's ODP.NET (beta 3): Most powerful of the three, enables easy editing, viewing of keys and indexes.

Devart's DotConnect: Viewing of tables and fields.

DataDirect's Progress: Enables easy editing, viewing of keys and indexes.

4. Updating from database experience (database first).

Oracle's ODP.NET (beta 3): Straightforward.

Devart's DotConnect: Shows tables from all schemas, no option to filter - makes finding tables exhausting.

DataDirect's Progress: Straightforward.

5. Data type mappings (database first).

Oracle's ODP.NET (beta 3): Default mapping for number(1,0), number(2,0) and number(3,0) are wrong*. Can manually override for number(2,0) and number(3,0). Fixing for number(1,0) doesn't work (at least not on beta 3 - may have worked in beta 2).

Update: Now that the release version is out (112030) this has been fixed. Some mappings are possible via section in app.config file.

Devart's DotConnect: Shows tables from all schemas, no option to filter - makes finding tables exhausting. Default mapping for binary float, binary double, timestamp with time zone, number(2,0), number(3,0) and number(4,0) are wrong*. Manual override should work - didn't check.

DataDirect's Progress: Default mappings are OK*.

(*) Mappings I expected:

DB Data Type    .NET Data Type
integer     Decimal
int         Decimal
smallint        Decimal
long        String
decimal     Decimal
rowid       String
float       Decimal
double      Decimal
binary float    Single
binary double   Double
char[40]        String
charvar[40]     String
natchar[40]     String
natcharvar[40]  String
natcharacter[40]    String
natcharactervar[40] String
number      Decimal
numeric     Decimal
nvarchar2[40]   String
real        Decimal
date        DateTime
timestamp       DateTime
timestamplocal  DateTime
timestampzone   DateTimeOffset
xml String
raw15       Binary
raw16       Guid
raw17       Int64
number(1,0)     Boolean
number(2,0)     Byte or SByte
number(3,0)     Byte or SByte (accepted Int16 as OK too)
number(4,0)     Int16
number(5,0)     Int16 (accepted Int32 as OK too)
number(6,0)     Int32
number(7,0)     Int32
number(8,0)     Int32
number(9,0)     Int32
number(10,0)    Int32 (accepted Int64 as OK too)
number(11,0)    Int64
number(15,0)    Int64
number(16,0)    Int64
number(17,0)    Int64
number(18,0)    Int64
number(19,0)    Int64 (accepted Decimal as OK too)
number(20,0)    Decimal (would accept Int64 as OK too)
number(21+,0)   Decimal

If you want the database type to be able to store any number in the .NET type range then IntX requires a number(N,0) where Ceil(log10(2^X)) = N for storage**.

Bool (Int1) ==> number(1,0)
Byte (Int8) ==> number(3,0)
Int16, UInt16 ==> number(5,0)
Int32, UInt32 ==> number(10,0)
Int64 ==> number(19,0)
UInt64 ==> number(20,0)

** Calculation assumes unsigned numbers, for signed numbers ceil(log(2^(X-1)).

References for data type assumptions:
TECH on the Net
Devart
Oracle

这篇关于Oracle的实体框架兼容提供程序的比较?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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