コード例 #1
0
 public virtual IQueryable <T> Get()
 {
     return(_context.Set <T>().Where(e => !e.Deleted));
 }
コード例 #2
0
 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());
 }
コード例 #3
0
 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());
 }