Пример #1
0
 public ActionResult <CarsInfo> CreateCarInfo([FromBody] CarsInfo value)
 {
     try
     {
         if (value != null)
         {
             WebDb.AddCarsInfo(value);
             WebDb.SaveChanges();
             return(Ok(value));
         }
     }
     catch (Exception ex)
     {
         return(NotFound("Couldn't post  car info - error: " + ex.Message));
     }
     return(NotFound());
 }