oracle – 在实体框架中映射SYS_REFCURSOR

我试图通过Entity Framework访问Oracle 11g上的存储过程.我可以访问返回标量的存储过程,并返回正确的值.但是,当使用SYS_REFCURSOR返回结果集时,在函数导入时未检测到OUT参数.

我的存储过程如下

create or replace PROCEDURE "GetAllClientNames" (
  "ID" IN NUMBER,"SAL" IN NUMBER,"EMP_CURSOR" OUT SYS_REFCURSOR) IS

BEGIN 


    OPEN EMP_CURSOR FOR SELECT FirsTNAME FROM CLIENTS;

END;

但是在更新实体并执行函数导入时,导入的函数中未检测到SYS_REFCURSOR OUT参数以检索结果集.

请帮我解决这个问题.没有OUT参数我无法访问存储过程检索的结果集

现在oracle数据提供程序允许这种操作没有太多的喧嚣.它在这里过于精心回答.添加快速阅读.请按照以下链接获取详细信息.

ODP.NET 11g Release 2 (11.2.0.3.0),and higher,enables applications
to run stored procedures with REF CURSOR parameters without using
explicit binding for these parameters in the .NET code.

For a read-only result set,such as a REF CURSOR using
OracleDataReader,REF CURSOR schema information is retrieved
automatically.

For some scenarios,such as when updateable REF CURSORs or Entity
Framework is used,developers need to define the REF CURSOR schema
information so that the application can bind the implicit REF CURSOR.
Entity Framework applications use implicit REF CURSOR binding to
instantiate complex types from REF CURSOR data. Applications must
specify REF CURSOR bind and Metadata information in the app.config,
web.config,or machine.config .NET configuration file.

The attributes supplied in the .NET configuration file are also used
when the application requests for schema information from the
OracleDataReader object that represents a REF CURSOR. This means that
for REF CURSORs that are created using a SELECT from a single table,
the application can update that table through the use of
OracleDataAdapter and OracleCommandBuilder.

When using the Entity Framework,function imports can return an
implicitly-bound REF CURSOR. The REF CURSOR can be returned as a
collection of complex types or entity types. To return a complex type
collection,the .NET configuration file needs to define the REF CURSOR
bind and Metadata information. To return an entity type collection,
only the bind information needs to be defined in the .NET
configuration file.

查找完整信息here

相关文章

Java Oracle 结果集是Java语言中处理数据库查询结果的一种方...
Java AES和Oracle AES是现代加密技术中最常使用的两种AES加密...
Java是一种广泛应用的编程语言,具备可靠性、安全性、跨平台...
随着移动互联网的发展,抽奖活动成为了营销活动中不可或缺的...
Java和Oracle都是在计算机领域应用非常广泛的技术,他们经常...
Java 是一门非常流行的编程语言,它可以运行于各种操作系统上...