Exemplo n.º 1
0
        protected async Task DispachCommandAsync <TCommand>(TCommand command)
            where TCommand : ICommandProvider
        {
            Authorize(command);

            await _commandDispatcher.DispachAsync(command);
        }
Exemplo n.º 2
0
        public async Task <IActionResult> Post([FromBody] CreateProduct command)
        {
            await _commandDispatcher.DispachAsync(command);

            return(Accepted());
        }