public async Task <BasePagingDto <FieldDto> > GetFieldByStoreId(int storeId, int currentPage, int pageSize) { var listStore = await _fieldRepository.GetByStoreId(storeId); var listFieldDto = _mapper.Map <List <FieldDto> >(listStore); var result = MakePaging.FieldDtotoToPaging(listFieldDto, currentPage, pageSize); return(result); }
public async Task <BasePagingDto <FieldDto> > GetFieldBySearch(SearchFieldRequest request, int currentPage, int pageSize) { var listField = await _fieldRepository.GetFieldBySearch(request); var listFieldDto = _mapper.Map <List <FieldDto> >(listField); var result = MakePaging.FieldDtotoToPaging(listFieldDto, currentPage, pageSize); return(result); }