I am using Code First.
execute
try
{
_context.SaveChanges();
}
catch (EntityException e)
{
}
Validation failed for one or more entities. See ‘EntityValidationErrors’ property for more details.
this.Property(t => t.Senha)
.HasMaxLength(15);
I forced a password greater than 15 characters, catch will never execute, why?
The error occurs at validating the entity resulting in a DbEntityValidationException.
So try