public dynamic Put([FromBody] Car car) { var result = _carManager.CreateCar(car); return(new { success = result }); }
public IActionResult CreateUpdateCar(CarViewModel car) { if (!ModelState.IsValid) { return(View("CreateUpdateCar", car)); } if (car.Id == 0) { carManager.CreateCar(car); } else { carManager.UpdateCar(car); } return(Json(new { success = true })); }