title: Shopping cart session state done right in ASP.NET MVC
body: <p>I'm implementing a simple session cart for unauthenticated users in ASP.NET MVC and I want to do it right.</p>
  
  <p>In the past I have always stored the cart ID in the persistent <code>Session["CartID"]</code> store and as a cookie. Whenever I need to display the cart, I'll look up the user's cart items from my <code>Carts</code> and <code>CartItems</code> tables. But inside I know a more strongly-typed approach would be cleaner.</p>
  
  <p>After Googling for the latest session MVC stuff, I found the term <code>HttpSessionStateWrapper</code>, which seems to be a testable way of dealing with sessions. But I have not found any good tutorials or standardised implementations. Maybe it's just a buzz-word and I should be sticking to <code>Session["..."]</code>.</p>
  
  <p>What is the right way to implement a shopping cart using sessions in the latest version of ASP.NET MVC?</p>