Quantcast
Channel: Entity Framework
Viewing all articles
Browse latest Browse all 10318

Created Issue: How to automatically make EntityValidationErrors bindable? [651]

$
0
0
How can we bind EF EntityValidationErrors so the corresponding WPF grid cells show the errors?

Ex: When DbContext.SaveChanges() throws a DbEntityValidationException with ValidationErrors:
Customer 41
The CustomerId field is required.
The Currency field is required.
Customer 42

we want the display the errors in the grid cells.

With Windows Forms and ADO.NET one simply binds a DataTable to a DataGridView and the DB errors display automatically when pointing at the red exclamation mark.

I there really not code designer to create entities with IDataErrorInfo or an equivalent?

I could not even find an example mapping EntityValidationErrors to IDataErrorInfo or something.

For a detailled discussion see http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/374a2583-8377-4d58-ab12-af305de569b1

Viewing all articles
Browse latest Browse all 10318

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>