Example #1
0
        public async Task <IActionResult> Get()
        {
            try
            {
                var result = await _petsService.GetCatsGroupedByOwnerGender().ConfigureAwait(false);

                return(Ok(result));
            }
            catch (Exception)
            {
                return(StatusCode(StatusCodes.Status500InternalServerError, "An error occured while getting list of cats"));
            }
        }
Example #2
0
 public async Task OnGetAsync()
 {
     Groupings = await _petsService.GetCatsGroupedByOwnerGender();
 }