如何使用Oracle.ManagedDataAccess.EntityFramework访问Oracle过程?
我在Oracle 11g数据库中有2个表:COURSES
和AUTHORS
。我创建了一个像这样的简单过程:
create or replace PROCEDURE GET_COURSE_DETAILS(OUT_COURSES OUT SYS_REFCURSOR)
AS
BEGIN
OPEN OUT_COURSES FOR
SELECT COURSEID, NAME, TITLE, DESCRIPTION, PRICE, LEVELSTRING, LEVELS
FROM COURSES C
INNER JOIN AUTHORS A ON C.AUTHORID = A.AUTHORID;
END;
我从简单的控制台应用程序中,使用 Oracle.ManagedDataAccess.EntityFramework 连接到该数据库,并查询如下过程:
static void Main(string[] args)
{
RoomiEntities dbContext = new RoomiEntities();
var courses = dbContext.GET_COURSE_DETAILS();
}
当我调用GET_COURSE_DETAILS
函数时,它在DbContext实现类中显示此错误:
内部异常提示
OracleException: ORA-06550: line 1, column 8:
PLS-00306: wrong number or types of arguments in call to 'GET_COURSE_DETAILS'
ORA-06550: line 1, column 8:
PL/SQL: Statement ignored
能帮我解决这个问题吗?