About ViewCart and ShoppingCart

Jul 30, 2010 at 2:07 AM

In the AddItem method in MyShoppingCart.cs, I found that the program add a new product into ShoppingCart table. But In the MyShoppingCart.aspx, the Data Source Control gets data from ViewCarts, I can't understand how does ViewCart table get its data? Are there any ralationship between ShoppingCart and ViewCart? Your response will be appreciated.

Aug 2, 2010 at 11:34 PM


I am not exactly sure about your question but if you double click your edmx file and right click on the page where it shows the tables and choose model browser, there you should be able to figure out how viewcart gets its data.

Hope this was to the point.

Aug 3, 2010 at 7:40 AM

Thank you! I know the reason. I treated ViewCart as a table, Actually it's a view.