如果问题被重复,请原谅。我的解决方案中有两个项目,一个控制台应用程序和一个 MVC4 网站。我正在使用 Oracle 管理的驱动程序来访问 oracle 数据库 11g。我正在尝试从以下存储过程中检索数据:
create or replace procedure "GETEMPIDS"
(
p_cursor OUT SYS_REFCURSOR
)
is
begin
OPEN p_cursor FOR
select *
from EMP;
end;
在我的控制台应用程序中创建实体和其他内容后,我通过以下方式获取数据:
public List<GETEMPIDS_Result> GetAllEmployees()
{
Entities db = new Entities();
List<GETEMPIDS_Result> result = db.GETEMPIDS().ToList<GETEMPIDS_Result>();
return result;
}
我在我的网站中添加了此控制台应用程序的引用,但是当我在控制器中调用上述方法时,它给出了异常:
"ORA-06550: line 1, column 8:\nPLS-00306: wrong number or types of arguments in call to 'GETEMPIDS'\nORA-06550: line 1, column 8:\nPL/SQL: Statement ignored"}
在上下文类的下一行
public virtual System.Data.Entity.Core.Objects.ObjectResult<GETEMPIDS_Result> GETEMPIDS()
{
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<GETEMPIDS_Result>("GETEMPIDS");
}
有什么我想念的吗?