public async Task <PaginatedList <WorkItemViewModel> > GetFailedAsync( PagingParameters pagingParameters ) { var count = await this.repository .CountAsync(new WorkItemRetryLimitHitCount(WorkItem.WORKITEM_RETRIES)); var items = await this.repository .ListAsync(new WorkItemRetryLimitHitCountOrderedPaginated( WorkItem.WORKITEM_RETRIES, pagingParameters.SkipCount, pagingParameters.PageSize )); return(new PaginatedList <WorkItemViewModel>( ViewModelMapper.ToWorkItemViewModelList(items), count, pagingParameters.PageIndex, pagingParameters.PageSize )); }
public async Task <PaginatedList <WorkItemViewModel> > GetUpCommingsAsync( PagingParameters pagingParameters ) { var now = SystemTime.Now(); var count = await this.repository .CountAsync(new WorkItemDueDateGreaterThanNowCount(now)); var items = await this.repository .ListAsync(new WorkItemDueDateGreaterThanNowOrderedPaginated( now, pagingParameters.SkipCount, pagingParameters.PageSize )); return(new PaginatedList <WorkItemViewModel>( ViewModelMapper.ToWorkItemViewModelList(items), count, pagingParameters.PageIndex, pagingParameters.PageSize )); }
public IEnumerable <WorkItemViewModel> GetSnapshot() { return(ViewModelMapper.ToWorkItemViewModelList(this.Items.ToArray())); }