Beispiel #1
0
        public async Task <IActionResult> ActivateProduct(Guid id,
                                                          CancellationToken cancellationToken)
        {
            var command = new ActivateProductCommand {
                Id = id
            };
            await _mediator.Send(command, cancellationToken).ConfigureAwait(false);

            return(Ok());
        }
Beispiel #2
0
        public async Task <ActionResult> Activate([FromBody] ActivateProductCommand request)
        {
            var result = await mediator.Send(request);

            return(new JsonResult(result));
        }
        public async Task <ActivateProductResult> ActivateProductAsync(ActivateProductCommand command)
        {
            var productActivated = await _mediator.Send(command);

            return(productActivated);
        }
Beispiel #4
0
 public async Task <ActionResult> Activate([FromBody] ActivateProductCommand command)
 {
     return(new JsonResult(await _productApplicationService.ActivateProductAsync(command)));
 }