Exemplo n.º 1
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));
        }
Exemplo n.º 2
0
 public async Task <bool> AddShoppingListAsync(ShoppingList shoppingList)
 {
     ShoopingLists.Add(shoppingList);
     ShoppingListsChanged = true;
     return(await Task.FromResult(true));
 }