About ViewCart and ShoppingCart

Jul 30, 2010 at 3: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 3, 2010 at 12:34 AM


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 8:40 AM

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