public async Task <ItemStatisticResponseModel> GetItemStatisticAsync(ItemRequestModel requestModel) { (int count, List <StatisticModelDAL> statisticModels) = await _itemRepository.GetItemStatisticAsync(requestModel.PageNumber); ItemStatisticResponseModel response = new ItemStatisticResponseModel { TotalCount = count, StatisticModels = statisticModels.Select(statisticModelDAL => new StatisticModel { Type = statisticModelDAL.Type, Count = statisticModelDAL.Count }).ToList() }; return(response); }
public async Task <ItemStatisticResponseModel> GetItemsStatistic([FromBody] ItemRequestModel requestModel) { ItemStatisticResponseModel responseModel = await _itemService.GetItemStatisticAsync(requestModel); return(responseModel); }