/// <inheritdoc /> public virtual Task <List <TModel> > GetAllAsync(params Expression <Func <TModel, object> >[] includes) { //_logger.LogInformation("get all"); IQueryable <TModel> models = _context.Set <TModel>(); foreach (var include in includes) { models = models.Include(include); } return(models.ToListAsync()); }
public virtual IEnumerable <TModel> Get(params Expression <Func <TModel, object> >[] includes) { IQueryable <TModel> set = _context.Set <TModel>(); foreach (var include in includes) { set = set.Include(include); } return(set); }