public virtual async Task DeleteManyAsync(Expression <Func <T, bool> > selector, [CallerLineNumber] int lineNumber = 0, [CallerMemberName] string caller = null) { _cache?.DeleteMany(selector); await _dbSet.Where(selector).DeleteAsync(); _db.SaveChanges(); _rep?.DeleteManyAsync(selector); }
/// <summary> /// /// </summary> /// <param name="selector"></param> /// <param name="lineNumber"></param> /// <param name="caller"></param> public void DeleteMany(Expression <Func <T, bool> > selector, [CallerLineNumber] int lineNumber = 0, [CallerMemberName] string caller = null) { _cache?.DeleteMany(selector); _db.DeleteMany(selector); }