-
Notifications
You must be signed in to change notification settings - Fork 11
EF Common
Ivan Kozhin edited this page Sep 8, 2020
·
5 revisions
Task<TotalCountList<T>> FromSourceAsync<T>(
IQueryable<T> source,
CancellationToken cancellationToken = default)Creates a list with the total count from the queryable source. The calling will evaluate the query automatically.
Task<OffsetLimitList<T>> FromSourceAsync<T>(I
Queryable<T> source,
int offset,
int limit,
CancellationToken cancellationToken = default)Creates a new list with limit and offset properties from the queryable source. The calling will evaluate the query automatically.
Task<PagedList<T>> FromSourceAsync<T>(
IQueryable<T> source,
int page,
int pageSize,
CancellationToken cancellationToken = default)Creates a paged list from queryable source and query source by page and page size. The calling will evaluate the query automatically.
Task<PagedList<T>> AsOnePage<T>(
IQueryable<T> source,
CancellationToken cancellationToken = default)Returns collection of items as a paged list as one page.
Task<TEntity> GetAsync<TEntity>(this DbSet<TEntity> entities, params object[] keyValues);
Task<TEntity> GetAsync<TEntity>(this DbSet<TEntity> entities, CancellationToken cancellationToken,
params object[] keyValues);Get the entity by key values. Throws NotFoundException if the entity not found.