public IActionResult EditShoppingCart([FromRoute] Guid id, [FromBody] UpsertShoppingCartModel model) { var result = DispatchCommand(new EditShoppingCartCommand(id, model)); return(result.AsActionResult(NoContent)); }
public IActionResult AddShoppingCart([FromBody] UpsertShoppingCartModel model) { var result = DispatchCommand <AddShoppingCartCommand, ShoppingCartModel>(new AddShoppingCartCommand(model)); return(CreatedAtAction(nameof(GetShoppingCart), new { id = result.Id }, result)); }