O'Reilly logo

ASP.NET MVC with Entity Framework and CSS by Lee Naylor

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

© Lee Naylor 2016

Lee Naylor, ASP.NET MVC with Entity Framework and CSS , 10.1007/978-1-4842-2137-2_8

8. Creating a Shopping Basket

Lee Naylor

(1)Newton-le-Willows, Merseyside, UK

This chapter covers how to allow users to add products to their shopping basket. We’re going to treat a shopping basket as a list of “basket lines” with a basket ID, a product, a quantity, and the time when the entry was added to the basket. The features of the basket will be as follows:

  • The basket will allow logged in and anonymous users to add items to their basket and store these baskets in the database.

  • For demonstration purposes, we’re going to use the session to store a key that will represent the current user. The default session timeout is set to 20 minutes for ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required