public async Task <ActionResult> GetByPage(int page) { var clientsTask = _customersService.GetItemsPerPage(page); var countTask = _customersService.Count(); await Task.WhenAll(clientsTask, countTask); return(Ok(new { Items = clientsTask.Result, Count = countTask.Result })); }