Exemple #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));
        }
Exemple #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);
        }