使用devart dotConnect调用Oracle存储过程
|
我是Entity Framework的新手,正在尝试调用oracle存储过程,但未成功。所以这是我的问题:
如何使用devart dotConnect调用oracle存储过程?
例如,我有存储过程:
procedure get_problems(res out sys_refcursor) is
begin
open res
for
select id, name
from problems;
end;
从C#我想打电话给:
using (Entities entities = new Entities())
{
ObjectParameter res = new ObjectParameter(\"res\", typeof(byte[]));
ObjectResult<PROBLEM> problems = entities.SelectAllProblems(res);
}
但是会抛出\“ EntityCommandExecutionException \”:
执行时发生错误
命令定义。见内在
详情除外。
这是内部的例外:
ORA-06550:第2行,第
3:\\ nPLS-00306:错误的数字或类型
的论点
\'GET_PROBLEMS \'\\ nORA-06550:第2行
第3列:\\ nPL / SQL:语句被忽略
我用了
\“ typeof(byte [])\”
作为ObjectParameter类型,因为我在Devart Entity Developer的生成代码中看到了这一点。
ps。顺便说一下,您如何在大型项目中推荐dotConnect?
没有找到相关结果
已邀请:
2 个回复
你换
邪罗逢确胃
在C#的DbContext中: