Beispiel #1
0
 public ActionResult <CarModel> PutCarModel(int carBrandId, int id, [FromBody] CarModel carModel)
 {
     try
     {
         return(Ok(carModelService.EditCarModel(carBrandId, id, carModel)));
     }
     catch (NotFoundItemException ex)
     {
         return(NotFound(ex.Message));
     }
     catch (Exception ex)
     {
         return(StatusCode(StatusCodes.Status500InternalServerError, ex.Message));
     }
 }