Esempio n. 1
0
        public static void RemoveFromCart(string movieId)
        {
            var cartRepo = new CartItemRepository();
            var cartItem = cartRepo.Find(AuthenticationService.LoggedUser.Id, movieId);

            if (cartItem != null)
            {
                cartRepo.Delete(cartItem);
            }
        }
Esempio n. 2
0
        public static async Task SendCartAsync()
        {
            var table = _azureClient.GetTable <CartItem>();

            var cartItemRepo = new CartItemRepository();
            var items        = cartItemRepo.FindAll(AuthenticationService.LoggedUser.Id);

            foreach (var item in items)
            {
                await table.InsertAsync(item);

                cartItemRepo.Delete(item);
            }
        }