/// <summary> /// /// </summary> /// <param name="pageIndex">0-based page index</param> /// <param name="pageSize"></param> /// <param name="descending"></param> /// <returns></returns> public virtual async Task <TotalResult <List <SubscriberCategorySettingsLong> > > Find(int pageIndex, int pageSize, bool descending) { RepositoryResult <SubscriberCategorySettingsLong> response = null; using (Repository repository = new Repository(_dbContextFactory.GetDbContext())) { response = await repository .FindPageAsync <SubscriberCategorySettingsLong, long>(pageIndex, pageSize, descending , x => true , x => x.SubscriberCategorySettingsId, true) .ConfigureAwait(false); } return(response.ToTotalResult()); }
/// <summary> /// /// </summary> /// <param name="subscriberIds"></param> /// <param name="pageIndex">0-based page index</param> /// <param name="pageSize"></param> /// <param name="descending"></param> /// <returns></returns> public virtual async Task <TotalResult <List <StoredNotification <long> > > > Select(List <long> subscriberIds , int pageIndex, int pageSize, bool descending) { RepositoryResult <StoredNotificationLong> response = null; using (Repository repository = new Repository(_dbContextFactory.GetDbContext())) { response = await repository .FindPageAsync <StoredNotificationLong, DateTime>(pageIndex, pageSize, descending , x => subscriberIds.Contains(x.SubscriberId) , x => x.CreateDateUtc, true) .ConfigureAwait(false); } return(response.ToTotalResult <StoredNotificationLong, StoredNotification <long> >()); }