コード例 #1
0
 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"));
     }
 }
コード例 #2
0
 public ActionResult <IEnumerable <TypePet> > Get()
 {
     return(_typePetService.getAllTypePets());
 }