public List <ShoppingListItem> Add([FromBody] ShoppingListItem shoppingListItem) { _context.Add(shoppingListItem.ToData()); _context.SaveChanges(); return(this.All()); }
public List <FridgeItem> Add([FromBody] FridgeItem fridgeItem) { _context.Add(fridgeItem.ToData()); _context.SaveChanges(); return(_context.FridgeItems.Select(r => r.ToShared()).ToList()); }