/* To Delete multiple record at a time :) * <param name="predicate"> contains an expression like > where clause OR list */ public virtual void DeleteWhere(IEnumerable <T> list) { _dbContext.Set <T>() .RemoveRange(list); // directly contain a list of record Save(); // save changes }
public BaseRepository(olxDbContext dbContext) { _dbContext = dbContext; _dbset = _dbContext.Set <T>(); }