public IHttpActionResult AddShoppingListItem(Guid id, [FromBody] ItemDto item) { service.AddItemToShoppingList(id, item); return(Created($"lists/{id}/items/{item.Name}", item)); }
public IActionResult AddItemToShoppingList([FromBody] ShoppingListModel shoppingList) { _shoppingListService.AddItemToShoppingList(shoppingList); return(Ok()); }
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()); }
public IActionResult AddItemToShoppingList([FromBody] ShoppingListModel shoppingListModel) { var result = _shoppingService.AddItemToShoppingList(shoppingListModel); return(Ok(result)); }