How do I check EntityValidationErrors when validation fails?

Question!

I get this message when I try to edit a property in MVC 4 database first project. I'm using the MVC default edit page.

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

Where do I check for validation?



Answers

If you set a break point in your controller you can check which values have errors against them by looking in the ModelState. The ModelState.Values collection contains the error and the key is the field.



This video can help you solving your question :)
By: admin