コード例 #1
0
 public ActionResult Save([FromBody] Vehicle vehicle)
 {
     try
     {
         if (!ModelState.IsValid)
         {
             return(BadRequest(ModelState));
         }
         _vehicleBusiness.Save(vehicle);
         return(Ok());
     }
     catch (Exception e)
     {
         return(StatusCode(500, e.Message));
     }
 }