| 1234567891011121314151617181920212223242526272829 |
- 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
- {
- /// <summary>
- /// Ajout d'une meilleure gestion des exceptions Entity pour la méthode "SaveChanges"
- /// </summary>
- /// <returns></returns>
- public override int SaveChanges()
- {
- try
- {
- return base.SaveChanges();
- }
- catch (DbEntityValidationException e)
- {
- var newException = new Internal.FormattedDbEntityValidationException(e);
- throw newException;
- }
- }
- }
- }
|