C# &引用;Size属性的大小0 addparam“无效;使用StoredProcedureEFCore Nuget包时出错
我正在为我的.net core pwa项目使用StoredProcedureEFCore nuget包。 我试图将存储过程与一些字符串输出参数一起使用,但当我运行它时,它会给出错误消息“Size属性的大小无效,为0” 我已阅读文档,但找不到有关字符串大小的内容: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(
我也测试过这个:
我对此进行了测试:
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)