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