[英]C# Entity Framework using PostgreSQL, NPGSQL and stored procedures returning a table result parameter errors
Using .Net Framework 4.5, Entity Framework 6.0.0.0, and NPGSQL, I am trying to update the model from the database and use a stored procedure that returns a table result from a PostgeSQL stored procedure (function). 我正在使用.Net Framework 4.5,Entity Framework 6.0.0.0和NPGSQL,尝试从数据库更新模型并使用存储过程,该存储过程从PostgeSQL存储过程(函数)返回表结果。
I am getting an error for each column that comes from the stored procedure that states the column 我收到来自指出该列的存储过程的每个列的错误
... has a parameter direction value 'null', which is not valid.
...的参数方向值为“ null”,无效。 Please use 'IN', 'OUT', or 'INOUT'
请使用“ IN”,“ OUT”或“ INOUT”
From my understanding of PostgreSQL, when returning a table, you don't specify IN
or OUT
. 根据我对PostgreSQL的理解,返回表时,您没有指定
IN
或OUT
。
Is there a workaround for this or am I missing a setting, etc for .Net or PostgreSQL? 是否有解决方法,或者我缺少.Net或PostgreSQL的设置等?
=> Your definition: =>您的定义:
Create function xpto (p1 integer, p2 varchar)
RETURNS TABLE (a int, b int) ...
=> Change the definition =>更改定义
Create function xpto (IN p1 integer, IN p2 varchar, OUT a int, OUT b int)
RETURNS SETOF record
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.