Exemplo n.º 1
0
 public ActionResult <CarsType> CreateCarType([FromBody] CarsType value)
 {
     try
     {
         if (value != null)
         {
             WebDb.AddCarsType(value);
             WebDb.SaveChanges();
             return(Ok(value));
         }
     }
     catch (Exception ex)
     {
         return(NotFound("Couldn't post  car  - error: " + ex.Message));
     }
     return(NotFound());
 }