什么是ORM点如果非要定义的app.config各个领域的Oracle .NET实体框架非要、实体、框架、定义

2023-09-05 23:27:00 作者:身中ゝ剧毒ヾ

据我所知,实体框架的全部意义在于简化和统一的数据访问模式。

我下载了最新的Oracle的.NET工具(ODAC 11.2第4版),号称EF4支持,我想进口一些Oracle存储过程(通过函数导入)具有一个引用游标作为输出参数。 当我阅读 Oracle的网站

它说,我必须定义在我的app.config裁判光标返回的每个领域。 井。这是非常愚蠢的,使得整个实体框架无用的甲骨文。

我缺少的东西?

解决方案   

实体框架的全部意义在于简化和统一的数据访问模型

在理论上是的。在实践中MS针对MS工具=他们只能在支持SQL Server和SQL Server CE的功能。如果其他数据库提供了一些特殊的附加功能,他们要么不EF用或必须以某种方式窃取了

  

存储过程(通过函数导入)具有一个引用游标作为输出参数。

这是这种特征的例子。我不知道从存储过程中的SQL服务器数据库返回游标和EF真的不支持的可能性。

  

它说,我必须定义在我的app.config裁判光标返回的每个领域。以及..这是非常愚蠢的,使得整个实体框架无用的甲骨文。

但是,这并不是EF的问题,而是方式甲骨文如何建立使用它的API。恕我直言,整个光标以某种方式通过ODP.NET隐藏,并将它传递正常的结果设置为EF。光标结果的映射结构进行说明。

Web.config App.config Transformation switch Debug or Release mode

To my knowledge, the whole point of Entity framework is to simplify and unify data access models.

I downloaded latest Oracle's .net tools (ODAC 11.2 Release 4) which claims EF4 support, and I'm trying to import some Oracle stored procedure (through function import) that has one ref cursor as output param. When I read the documentation on Oracle's site

It says that I have to define each field returned by the ref cursor in my app.config. Well. That's extremely stupid and makes the whole Entity framework useless for Oracle.

Am I missing something?

解决方案

the whole point of Entity framework is to simplify and unify data access models

In theory yes. In practice MS targets MS tools = they work only on support of SQL server and SQL Server CE features. If other databases provide some special additional features they are either not available in EF or must be somehow hacked in.

stored procedure (through function import) that has one ref cursor as output param.

That is the example of such feature. I don't know about possibility of returning database cursor from stored procedure in SQL server and EF really doesn't support that.

it says that I have to define each field returned by the ref cursor in my app.config. well.. That's extremely stupid and makes the whole Entity framework useless for Oracle.

But that is not problem of EF but of the way how Oracle build the API to use it. IMHO the whole cursor is somehow hidden by ODP.NET and it pass normal result set to EF. The mapping of cursor result is described in configuration.