示例#1
0
        public ActionResult <IEnumerable <AnimalModel> > GetShelterAnimals
            ([FromQuery] int shelterId, [FromQuery] int pageNumber)
        {
            var result = _shelterRepository.GetShelterAnimals(shelterId, pageNumber);

            if (result.IsError)
            {
                return(BadRequest(result.Message));
            }

            return(Ok(result.Data));
        }