Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can someone please help me this shopping cartt am get an error and i don't know how to go about it.....Below is the Error and

Can someone please help me this shopping cartt am get an error and i don't know how to go about it.....Below is the Error and the cshtml and cshtml.cs code

image text in transcribed
@page @model WebApp . Pages . ShoppingCartModel; @using WebApp . Models; 5 ViewData["Title"] = "ShoppingCart"; Exception Thrown DX Layout = "~/Pages/Shared/_UserLayout. cshtml" System.NullReferenceException: 'Object reference not set to an instance of an object.' 9 10
AspNetCoreGeneratedDocument.Pages_ShoppingCart.Model.get.MyCa 11

Your Cart

rt was null. 12 Show Call Stack | View Details | Copy Details | Start Live Share session 13 Exception Settings 14 Break when this exception type is thrown 15 Except when thrown from: WebApp.dll Open Exception Settings | Edit Conditions 23 @foreach (var item in Model . MyCart) X 24 M - - --- 25 Product p = (Product)item . product: X 0 A 2
ImageProductQuantity Total

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions