예제 #1
0
 public ActionResult <PetType> Post([FromBody] PetType newPetType)
 {
     try
     {
         return(StatusCode(201, _petTypeService.Createtype(newPetType)));
     }
     catch (Exception e)
     {
         return(StatusCode(500, e.Message));
     }
 }