且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

EF异常:字符串或二进制数据将被截断。声明已经终止。

更新时间:2022-12-23 20:40:00

catch (DbEntityValidationException ex)
{
    foreach (var item in ex.EntityValidationErrors)
    {
        //... inspect here 
    }
}

You can find the information you need inside foreach loop.

Hope that helps.