コード例 #1
0
 public IHttpActionResult AddShoppingListItem(Guid id, [FromBody] ItemDto item)
 {
     service.AddItemToShoppingList(id, item);
     return(Created($"lists/{id}/items/{item.Name}", item));
 }
コード例 #2
0
 public IActionResult AddItemToShoppingList([FromBody] ShoppingListModel shoppingList)
 {
     _shoppingListService.AddItemToShoppingList(shoppingList);
     return(Ok());
 }
コード例 #3
0
        public IActionResult AddItemToShoppingList([FromBody] ShoppingListModel shoppingList)
        {
            _shoppingListService.AddItemToShoppingList(shoppingList);

            return(Ok($"Successfully added {shoppingList.Name}"));
        }
コード例 #4
0
 public IActionResult addItem([FromBody] ShoppingListViewModel model)
 {
     _shoppingListService.AddItemToShoppingList(model);
     return(Ok());
 }
コード例 #5
0
        public IActionResult AddItemToShoppingList([FromBody] ShoppingListModel shoppingListModel)
        {
            var result = _shoppingService.AddItemToShoppingList(shoppingListModel);

            return(Ok(result));
        }