Click here to Skip to main content
15,078,241 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need help creating a view that will display the pizza size and the toppings. I got both in a SQL table. They need to be selected by using a checkbox. Then when they are done designing the pizza, they need to press a button that will redirect them to the checkout page where they can review their order.

create table tblIntgredients
dID int identity(1,1) primary key,
dIngredient varchar (25),
dCost decimal (25),

create table tblPizzasize
dID int identity(1,1)primary key,
dSize varchar(15),
dPrice varchar (5),

Now, How can I display the Ingredient name with the price, and how can I display the size with the price?( got a model for each of these tables)

Then, how can I make a shopping cart model that will fit these two models? How can I add the selected items to the cart for checkout? If anyone can help me, it will be much appreciated.

What I have tried:

I tried following book tutorials and youtube tutorials, but they are hard to follow as they only do one table and I need two tables. Some of the tutorials are hard to follow because they don't explain. Or I have a hard time implementing my code like they are
Updated 18-Aug-18 7:54am
Gerry Schmitz 18-Aug-18 12:40pm
The name of the forum is "Quick Answers".

You're asking someone to do your job.

1 solution

I don't think I really understand your questions very well.

Let's assume you have models (POCO classes) for both Pizza Entity and Ingredient, each having a property ID. and the Pizza entity having a navigation property to list of ingredients added to it.

So create a model call it CartItem with the following properties :


Then when the "Add to cart " is clicked get the pizza and the ingredient from the database and use them to supply values into the CartItem.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900