Tuesday, July 19, 2016

Viewing the ValidationExceptions Collection

Occassionally, .NET apps that are using EntityFramework will throw the following error

System.Data.Entity.Validation.DbEntityValidationException: Validation failed for one or more entities. See 'EntityValidationErrors' property for more details.
The easiest way to see what these exceptions is to add the following to the Watch window:
((System.Data.Entity.Validation.DbEntityValidationException)$exception).EntityValidationErrors


1 comment:

  1. Lucky Eagle Casino: Get $10 free at Slots of Vegas
    Lucky Eagle Casino is a 김해 출장마사지 popular casino 경상북도 출장마사지 in 통영 출장마사지 Downtown Las 강원도 출장안마 Vegas. There are 고양 출장안마 50000 square feet of casino gaming machines and 614 slot machines.

    ReplyDelete