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