示例#1
0
        public IActionResult PostData([FromBody] PostDataCommand command)
        {
            _commandDispatcher.Dispatch(command);
            var response = new PostDataResponse
            {
                Greeting = command.GetResult(),
            };

            return(this.Ok(response));
        }
示例#2
0
        public async Task <IActionResult> PostDataAsync([FromBody] PostDataCommand command)
        {
            await _commandDispatcher.DispatchAsync(command);

            var response = new PostDataResponse
            {
                Greeting = command.GetResult(),
            };

            return(this.Ok(response));
        }