阅读背景:

LINQ2SQL:如何实现通用的最大字符串长度验证?

来源:互联网 

A common problem in LINQ2SQL is while the .NET String allows assigning any length to its variable, your database may have a specific max length constraint (like VARCHAR(5)). This will lead to the SQL error message "String or binary data would be truncated.", which is extremely unhelpful since it doesn't tell you which fields is the culprit.A common problem in LINQ2SQL is while the .NET




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: