Example #1
0
        protected async Task DispachCommandAsync <TCommand>(TCommand command)
            where TCommand : ICommandProvider
        {
            Authorize(command);

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

            return(Accepted());
        }