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}"));
        }
 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));
        }