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

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

            return(Ok(result));
        }