Ejemplo n.º 1
0
        public async Task <IActionResult> Post(AddProductToCartCommand command)
        {
            await _dispatcher.SendAsync(command.Bind(c => c.CustomerId, UserId));

            return(CreatedAtAction(nameof(Get), new GetCartQuery()
            {
                Id = command.CustomerId
            }, null));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> PostAsync(AddProductToCartCommand command)
        {
            var result = await SendAsync(command.Bind(c => c.CustomerId, UserId), resourceId : command.CustomerId, resource : "carts");

            return(result);
        }