コード例 #1
0
        public async Task <ActionResult <IEnumerable <NewYorkSecondDtos> > > GetSortData([FromQuery] SortParams sortParams)
        {
            var newYork = await _generalRepository.GetAllDataSort(sortParams);

            if (newYork != null)
            {
                return(_mapper.Map <List <NewYork>, List <NewYorkSecondDtos> >(newYork.Value.ToList()));
            }
            return(BadRequest("Oops!, request not executed successfully"));
        }