Пример #1
0
 public void delete(TEntity entity, bool isSave = true)
 {
     Entities.Remove(entity);
     if (isSave)
     {
         _dbContext.SaveChanges();
     }
 }
Пример #2
0
 public void delete(TEntity entity, bool isSave = true)
 {
     //throw new NotImplementedException();
     Entities.Remove(entity);
     if (isSave)
     {
         _dbContext.SaveChanges();
     }
 }
Пример #3
0
 public void Add(T TModel)
 {
     _generalDbContext.Set <T>().Add(TModel);
     _generalDbContext.SaveChanges();
 }