public IActionResult AddNewVehicle([FromBody] Vehicles vehicle) { if (ModelState.IsValid) { if (manager.AddNewVehicle(vehicle) != null) { return(Created("Vehicles/" + vehicle.VehicleNumber, vehicle)); } } return(BadRequest(ModelState)); }