public IActionResult GetAllAnimals() { var result = _animalRepository.GetAllAnimals(); if (!result.Any()) { return(NotFound("We don't like those animals")); } return(Ok(result)); }
public List <Animal> GetAllAnimals() { return(repository.GetAllAnimals()); }