public async Task <PageResponse <Document> > GetDocumentsAsync(IDbConnection dbConnection, PageRequest pageRequest) { _logger.LogInformation($"Getting documents page '{pageRequest}'..."); var dalObject = await _dbContext.GetDocumentsAsync(dbConnection, pageRequest); return(_mapper.Map <PageResponse <Document> >(dalObject)); }
public async void GetDocumentsAsync() { _logger.LogInformation("GetDocumentsAsync..."); var pageRequest = new PageRequest() { SortBy = "LastWrite", SortOrder = SortOrders.DESC, PageIndex = 0, PageSize = 50 }; using (var dbConnection = await _dbConnectionFactory.OpenUserConnectionAsync(UserId)) { var result = await _dbContext.GetDocumentsAsync(dbConnection, pageRequest); Assert.NotNull(result); } }