Validation failed for one or more entities. See 'EntityValidationErrors' property for more details.<!-- --> | <!-- -->Patrick Desjardins Blog
Patrick Desjardins Blog
Patrick Desjardins picture from a conference

Validation failed for one or more entities. See 'EntityValidationErrors' property for more details.

Posted on: May 13, 2013

The problem with the error "Validation failed for one or more entities. See 'EntityValidationErrors' property for more details." is that you cannot go inside it. In fact, you need to cast this one into DbEntityValidationException to be able to see inner errors.

dbentityvalidationexception 400x111

To see the exception details, you need to open the watch window, or the immediate window and type this line :

1((System.Data.Entity.Validation.DbEntityValidationException)$exception).EntityValidationErrors

From here, you will be able to see which entities are problematic and also what inner validation errors has been thrown.