public IActionResult PostData([FromBody] PostDataCommand command) { _commandDispatcher.Dispatch(command); var response = new PostDataResponse { Greeting = command.GetResult(), }; return(this.Ok(response)); }
public async Task <IActionResult> PostDataAsync([FromBody] PostDataCommand command) { await _commandDispatcher.DispatchAsync(command); var response = new PostDataResponse { Greeting = command.GetResult(), }; return(this.Ok(response)); }