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