示例#1
0
 public async Task <IList <DocumentDto> > GetDocumentsAsync(DocumentsFilterDto filterDto)
 {
     return(await _documentRepository.GetItemsQuery().Select(i => new DocumentDto
     {
         Id = i.Id,
         FileName = i.FileName,
         FileType = i.FileType,
         FileSize = i.FileSize,
         Company = i.Company,
         Manager = i.Manager,
         Application = i.Application,
         CreatedDate = i.CreatedDate,
     }).OrderBy(i => i.Id)
            .Skip(filterDto.Offset)
            .Take(filterDto.CountOnPage).ToListAsync());
 }
示例#2
0
 public async Task <int> GetDocumentsCountAsync(DocumentsFilterDto filterDto)
 {
     return(await _documentRepository.GetItemsQuery().CountAsync());
 }