public ActionResult <LaunchDto> Add(Launch launch) { var result = _launchService.Add(launch); return(result.IsSuccess ? Ok(new LaunchDto(result.Value)) : (ActionResult)NotFound()); }
public IActionResult Add([FromBody] LaunchViewModelInput launchViewModelInput) { try { _launchService.Add(launchViewModelInput); return(NoContent()); } catch (Exception ex) { return(BadRequest(ex)); } }