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

You may see this exception when doing a DbContext.SaveChanges() call. You then may go drilling into the exception details to find what the specific problem was and notice there’s nothing of value there.  A simple way of getting access to the EntityValidationErrors collection and actually seeing what’s in it is to add a watch for it:


Just copy and paste the above watch expression into the watch window and afterwards you can drill down to see what the problem(s) is. Thanks to Yoel Halb for this answer.

Leave a Reply

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