public IActionResult Post([FromBody] PilotDTO Pilot) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var result = _service.AddObject(Pilot); return(result == true?StatusCode(200) : StatusCode(404)); }
public IActionResult Post([FromBody] PilotDTO Pilot) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var result = _service.AddObject(Pilot); return(result == true?StatusCode(200) : StatusCode(404)); }