protected virtual void RemoveCore(TEntity entity) { try { DbSet.Remove(entity); } catch (DbEntityValidationException ex) { throw DbExceptionsConverter.Convert(ex); } catch (DbUpdateException ex) { throw DbExceptionsConverter.Convert(ex); } }
void IUnitOfWork.SaveChanges() { try { Context.SaveChanges(); } catch (DbEntityValidationException ex) { throw DbExceptionsConverter.Convert(ex); } catch (DbUpdateException ex) { throw DbExceptionsConverter.Convert(ex); } }