Exemple #1
0
        public ActionResult <PetType> Put(int id, [FromBody] PetType type)
        {
            if (id < 0 || id != type.Id)
            {
                return(BadRequest($"Owner with id {id} not found"));
            }

            return(StatusCode(202, _typeService.UpdateType(type)));
        }
Exemple #2
0
 public ActionResult <Pettype> Put(int id, [FromBody] Pettype type)
 {
     try
     {
         return(StatusCode(202, _petTypeService.UpdateType(type)));
     }
     catch (Exception e)
     {
         return(StatusCode(500, e.Message));
     }
 }