Example #1
0
 public void Delete(Expression <Func <T, bool> > where)
 {
     this._entity.Where(where).ToList().ForEach(del => _context.Set <T>().Remove(del));
     this._context.SaveChanges();
 }
Example #2
0
 public Repository(SmartContext context)
 {
     this._context = context;
     _entity       = context.Set <T>();
 }
 public DefaultRepository(SmartContext context)
 {
     _context = context;
     table    = _context.Set <T>();
 }