public async Task <GenericCommandResult> PostCategory(
     [FromBody] CategoryInsertCommand command,
     [FromServices] IHandler <CategoryInsertCommand> handler)
 {
     return((GenericCommandResult)await handler.Handle(command));
 }
Exemple #2
0
        public async Task <ActionResult> Insert(CategoryInsertCommand command)
        {
            await MediatorService.ExecuteHandler(command);

            return(NoContent());
        }