C# &引用;“不良存储属性”;LINQ to存储过程出错
我刚刚在我的项目中添加了一个新创建的SP,不幸的是它需要一个临时表来运行,所以我不得不手动为SP构建结果类。现在,当我尝试运行时,在下面的属性上出现“坏存储属性”错误C# &引用;“不良存储属性”;LINQ to存储过程出错,c#,asp.net,linq-to-sql,C#,Asp.net,Linq To Sql,我刚刚在我的项目中添加了一个新创建的SP,不幸的是它需要一个临时表来运行,所以我不得不手动为SP构建结果类。现在,当我尝试运行时,在下面的属性上出现“坏存储属性”错误 public partial class sp_One_EVA_Get_User_InformationResult { private string _Security_USER_ID; public sp_One_EVA_Get_User_InformationResult() { } [C
public partial class sp_One_EVA_Get_User_InformationResult
{
private string _Security_USER_ID;
public sp_One_EVA_Get_User_InformationResult()
{
}
[Column(Storage = "_Security_USER_ID;", DbType="VarChar(15) NOT NULL")]
public string Security_USER_ID
{
get
{
return this._Security_USER_ID;
}
set
{
if ((this._Security_USER_ID != value))
{
this._Security_USER_ID = value;
}
}
}
不确定这有什么问题,我已经用其他SP多次这样做,没有任何错误。可能是这一行出错了:
[Column(Storage = "_Security_USER_ID;", DbType="VarChar(15) NOT NULL")]
我将根据实际从数据库返回的内容仔细检查属性(VarChar(15)notnull
)的DbType
。很可能两者之间不匹配。写这行
[Column(Storage=“\u Security\u USER\u ID”,DbType=“VarChar(15)NOT NULL”)]
您的写入存储有错误,带有分号