Ejemplo n.º 1
0
 public async Task <GenericCommandResult> PostManufacturer(
     [FromBody] ProductInsertCommand command,
     [FromServices] IHandler <ProductInsertCommand> handler)
 {
     return((GenericCommandResult)await handler.Handle(command));
 }
Ejemplo n.º 2
0
        public async Task InsertAsync(ProductDTO productDTO)
        {
            ProductInsertCommand productInsertCommand = _mapper.Map <ProductInsertCommand>(productDTO);

            await _mediator.Send(productInsertCommand);
        }
Ejemplo n.º 3
0
        public async Task <ActionResult> Insert(ProductInsertCommand command)
        {
            await MediatorService.ExecuteHandler(command);

            return(NoContent());
        }