using System; using System.Collections.Generic; using System.Data.Entity.Validation; using System.Linq; using System.Text; using System.Threading.Tasks; namespace CD67.ModeleMVC.Entity { public partial class Entities { /// /// Ajout d'une meilleure gestion des exceptions Entity pour la méthode "SaveChanges" /// /// public override int SaveChanges() { try { return base.SaveChanges(); } catch (DbEntityValidationException e) { var newException = new Internal.FormattedDbEntityValidationException(e); throw newException; } } } }