public async Task <Cart> Get(Guid cartId)
        {
            var _cartFromDB = await Task.Run(() => {
                return(_cartHandler.Get(cartId));
            });

            return(_cartFromDB);
        }
Beispiel #2
0
      public IActionResult ViewCart()
      {
          Guid customerID = (Guid)TempData["ID"];

          var Items = cart.Get(customerID);

          if (Items == null)
          {
              return(BadRequest(new{ message = "Cart is empty" }));
          }
          return(Ok(Items));
      }