public void Save() { try { db.SaveChanges(); } catch (DbEntityValidationException dbEx) { foreach (var validationErrors in dbEx.EntityValidationErrors) { foreach (var validationError in validationErrors.ValidationErrors) { Trace.TraceInformation("Property: {0} Error: {1}", validationError.PropertyName, validationError.ErrorMessage); } } } }
public void Save() { db.SaveChanges(); }
private void Save() { db.SaveChanges(); }
public void Save() { entities.SaveChanges(); }