Shibly  Sadik

Shibly Sadik

  • NA
  • 167
  • 139k

Add data from List to database in mvc

Jul 1 2015 2:02 AM
I am developing a simple shopping cart in asp.net mvc. I created a list and stored the list item in a Session variable
called Session["cart"].

List<Item> cart=(List <Item>) Session["cart"];
Where Item is a class inside controller folder.


Now how can i store the records from Session["cart"]
to my database table called "Orders"??

Answers (4)