try { //........... dc.SaveChanges(); } catch (DbEntityValidationException ex) { foreach (var eve in ex.EntityValidationErrors) { System.Diagnostics.Debug.WriteLine("Entity of type \"{0}\" in state \"{1}\" has the following validation errors:", eve.Entry.Entity.GetType().Name, eve.Entry.State); foreach (var ve in eve.ValidationErrors) { System.Diagnostics.Debug.WriteLine("- Property: \"{0}\", Error: \"{1}\"", ve.PropertyName, ve.ErrorMessage); } } }Look for errors in the output window during debugging
world wide web development problems asp net php html xhtml css javascript jquery w3dproblems
Tuesday, September 16, 2014
Validation failed for one or more entities. See 'EntityValidationErrors' property for more details
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment