예제 #1
0
 public async Task <Tyre> GetTyreById(int id)
 {
     return(await TyreData.AsNoTracking()
            .FirstOrDefaultAsync(res => res.Id == id));
 }
예제 #2
0
 public async Task <Tyre> FirstOrDefaultTyre(Expression <Func <Tyre, bool> > predicate)
 {
     return(await TyreData.AsNoTracking()
            .FirstOrDefaultAsync(predicate));
 }
예제 #3
0
 public async Task <List <Tyre> > GetTyres(bool ordered = false)
 {
     return(await TyreData.AsNoTracking()
            .If(ordered, res => res.OrderBy(t => t.StintLen))
            .ToListAsync());
 }