【发布时间】:2010-03-04 20:28:49
【问题描述】:
我正在使用我正在转换为使用 .NET 的 Pgsql 的代码。我想调用具有多个参数的存储函数,但我想按名称绑定参数,如下所示:
NpgsqlCommand command = new NpgsqlCommand("\"StoredFunction\"", _Connection)
command.CommandType = CommandType.StoredProcedure;
command.Parameters.Add("param2", value2);
command.PArameters.Add("param1", value1);
到目前为止,尝试执行此操作以查找参数类型与我将参数添加到集合中的顺序匹配的函数,而不是按名称。
Npgsql 是否可以通过名称将参数绑定到存储的函数?
【问题讨论】:
标签: c# npgsql stored-functions postgresql