Beispiel #1
0
        public IActionResult EditShoppingCart([FromRoute] Guid id, [FromBody] UpsertShoppingCartModel model)
        {
            var result = DispatchCommand(new EditShoppingCartCommand(id, model));

            return(result.AsActionResult(NoContent));
        }
Beispiel #2
0
        public IActionResult AddShoppingCart([FromBody] UpsertShoppingCartModel model)
        {
            var result = DispatchCommand <AddShoppingCartCommand, ShoppingCartModel>(new AddShoppingCartCommand(model));

            return(CreatedAtAction(nameof(GetShoppingCart), new { id = result.Id }, result));
        }