public virtual List <TProjection> GetAllList <TProjection>(Options.GetAllProjectedOptions <TEntity, TPrimaryKey, TProjection> options) where TProjection : class { IQueryable <TProjection> query = AsQueryable <TProjection>( projection: options?.Projection, predicate: null, sort: options?.Sort, entitiesToSkip: options?.EntitiesToSkip, entitiesToTake: options?.EntitiesToTake); return(query.ToList()); }
public virtual List <TProjection> GetAllList <TProjection>(Options.GetAllProjectedOptions <TEntity, TPrimaryKey, TProjection> options, out long totalEntities) where TProjection : class { IQueryable <TProjection> countQuery = AsQueryable <TProjection>(projection: options?.Projection); totalEntities = countQuery.LongCount(); IQueryable <TProjection> listQuery = AsQueryable <TProjection>( projection: options?.Projection, predicate: null, sort: options?.Sort, entitiesToSkip: options?.EntitiesToSkip, entitiesToTake: options?.EntitiesToTake); return(listQuery.ToList()); }
public virtual Task <List <TProjection> > GetAllListAsync <TProjection>(Expression <Func <TEntity, bool> > predicate, Options.GetAllProjectedOptions <TEntity, TPrimaryKey, TProjection> options, out long totalEntities) where TProjection : class { return(Task.FromResult(GetAllList <TProjection>(predicate, options, out totalEntities))); }
public virtual Task <List <TProjection> > GetAllListAsync <TProjection>(Options.GetAllProjectedOptions <TEntity, TPrimaryKey, TProjection> options, out long totalEntities) where TProjection : class { return(Task.FromResult(GetAllList <TProjection>(options, out totalEntities))); }