public ActionResult <IEnumerable <TypePet> > Get() { try { if (_typePetService.getAllTypePets() != null) { return(Ok(_typePetService.getAllTypePets())); } return(NotFound()); } catch (System.Exception) { return(StatusCode(500, "Error when looking for list of pet types")); } }
public ActionResult <IEnumerable <TypePet> > Get() { return(_typePetService.getAllTypePets()); }