Exemplo n.º 1
0
        public async Task <bool> DeleteShoppingListAsync(string id)
        {
            var oldItem = ShoopingLists.Where((ShoppingList arg) => arg.Id == id).FirstOrDefault();

            ShoopingLists.Remove(oldItem);

            return(await Task.FromResult(true));
        }
Exemplo n.º 2
0
        public async Task <bool> UpdateShoppingListAsync(ShoppingList shoppingList)
        {
            var oldItem = ShoopingLists.Where((ShoppingList arg) => arg.Id == shoppingList.Id).FirstOrDefault();

            ShoopingLists.Remove(oldItem);
            ShoopingLists.Add(shoppingList);

            return(await Task.FromResult(true));
        }