コード例 #1
0
ファイル: CartController.cs プロジェクト: 42ama/Boorger-Shop
        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());
        }