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