Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sql-server/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/string/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# &引用;Size属性的大小0 addparam“无效;使用StoredProcedureEFCore Nuget包时出错_C#_Sql Server_Stored Procedures_Entity Framework Core - Fatal编程技术网

C# &引用;Size属性的大小0 addparam“无效;使用StoredProcedureEFCore Nuget包时出错

C# &引用;Size属性的大小0 addparam“无效;使用StoredProcedureEFCore Nuget包时出错,c#,sql-server,stored-procedures,entity-framework-core,C#,Sql Server,Stored Procedures,Entity Framework Core,我正在为我的.net core pwa项目使用StoredProcedureEFCore nuget包。 我试图将存储过程与一些字符串输出参数一起使用,但当我运行它时,它会给出错误消息“Size属性的大小无效,为0” 我已阅读文档,但找不到有关字符串大小的内容: 我也测试过这个: 我对此进行了测试: bookNameParameter.Size=500; 但它不适用于这个nuget包。 C# context.LoadStoredProc(“dbo.Book\u详细信息”) .AddParam(

我正在为我的.net core pwa项目使用StoredProcedureEFCore nuget包。 我试图将存储过程与一些字符串输出参数一起使用,但当我运行它时,它会给出错误消息“Size属性的大小无效,为0”

我已阅读文档,但找不到有关字符串大小的内容:

我也测试过这个:
我对此进行了测试:
bookNameParameter.Size=500;
但它不适用于这个nuget包。
C#
context.LoadStoredProc(“dbo.Book\u详细信息”)
.AddParam(“BookId”,BookId)
.AddParam(“Id”,out IOutParam Id)
.AddParam(“BookName”,out IOutParam BookName参数)
.AddParam(“ProducerName”,out IOutParam ProducerName参数)
.AddParam(“EnBookName”,out IOutParam EnBookName参数)
.AddParam(“EnProducerName”,out IOutParam EnProducerName参数)
.AddParam(“内容”,out IOutParam contentParameter)
.AddParam(“类型”,out IOutParam TypeParameter)
.AddParam(“价格”,out IOutParam PriceParameter)
.AddParam(“折扣价格”,out IOutParam折扣价格参数)
.AddParam(“LikeCount”,out-IOutParam-likeCountParameter)
.AddParam(“BaseLikeCount”,out IOutParam baseLikeCountParameter)
.AddParam(“BookPage”,out IOutParam BookPageParameter)
.AddParam(“PublisherName”,out IOutParam PublisherName参数)
.AddParam(“BookSize”,out IOutParam BookSizeParameter)
.AddParam(“LanguageType”,out IOutParam LanguageTypeParameter)
.AddParam(“PresentationMode”,out IOutParam PresentationModeParameter)
.AddParam(“ISBN”,out IOutParam ISBN参数)
.AddParam(“BookVersion”,out IOutParam bookVersionParameter)
.AddParam(“AverageRate”,out IOutParam averageRateParameter)
.Exec(r=>lsteption=r.ToList());

如何定义这些参数的大小?

尝试如下设置每个
IOutParam
的大小

.AddParam("BookName", out IOutParam<string> bookNameParameter,500)
.AddParam(“BookName”,out-IOutParam BookName参数,500)
.AddParam("BookName", out IOutParam<string> bookNameParameter,500)