示例#1
0
        public async Task <Cart> GetCart()
        {
            Cart cart = await sessionHelper.GetObjectFromJson <Cart>("cart");

            if (cart == null)
            {
                cart = new Cart();
                await sessionHelper.SetObjectAsJsonAsync("cart", cart);
            }
            return(cart);
        }
示例#2
0
        public async Task <IActionResult> ProductGetEditStep1()
        {
            JsonBoxModel pictureFilePath = await sessionHelper.GetObjectFromJson <JsonBoxModel>("pictureFilePath");

            ViewData["pictureFilePath"] = pictureFilePath != null ? (string)pictureFilePath.Value : null;
            return(View());
        }