public virtual IQueryable <T> Get() { return(_context.Set <T>().Where(e => !e.Deleted)); }
public Task <List <Order> > GetByCustomerPartialLastName(string lastName) { return(_context.Set <Order>().Where(o => !o.Deleted).Include(o => o.Customer) .Where(o => o.Customer.LastName.ToLowerInvariant().Contains(lastName.ToLowerInvariant())) .ToListAsync()); }
public virtual async Task <List <T> > Get <T2>(Expression <Func <T, bool> > predicate, Expression <Func <T, T2> > order) { return(await _context.Set <T>().AsNoTracking().Where(predicate).OrderBy(order).ToListAsync()); }