public void Put(int id, [FromBody] PlaneDTO plane) { if (ModelState.IsValid) { Response.StatusCode = 200; planeService.UpdatePlane(id, plane); } else { Response.StatusCode = 400; } }
public async Task <IActionResult> Put(int id, [FromBody] InputPlaneDTO plane) { if (ModelState.IsValid) { //Response.StatusCode = 200; await planeService.UpdatePlane(id, plane); return(Ok(plane)); } else { return(BadRequest()); } }