Validation failed for one or more entities. See ‘EntityValidationErrors
try{
context.SaveChanges();
}
catch (DbEntityValidationException ex)
{
var errorMessages = ex.EntityValidationErrors.SelectMany(validationResult => validationResult.ValidationErrors).Select(m => m.ErrorMessage);
var fullErrorMessage = string.Join(", ", errorMessages);
}