Home » Ado.Net » Entity Framework » Validation failed for one or more entities. See ‘EntityValidationErrors’ property for more details.

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

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

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

    ((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.

If you like my article, think to buy my annual book, professionally edited by a proofreader. directly from me or on Amazon. I also wrote a TypeScript book called Holistic TypeScript

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.