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); }
public async Task <IActionResult> ProductGetEditStep1() { JsonBoxModel pictureFilePath = await sessionHelper.GetObjectFromJson <JsonBoxModel>("pictureFilePath"); ViewData["pictureFilePath"] = pictureFilePath != null ? (string)pictureFilePath.Value : null; return(View()); }