views:

39

answers:

2

Reading conflicting opinions on using SQL session state vs custom db table in MVC to store user data across page requests?

What are the advantages and disadvantages to each method? Why should I pick one method over the other.

So far it seems a custom db table is the best solution because it doesn't time out, plus it would be strongly typed using the Entity Framework.

Am I missing something?

A: 

These articles outline strategy and performance for the various methods of Session storage.

JcMalta
I understand how session state works and all the different methods. I have used it plenty is ASP.NET forms. What I'm trying to figure out is why would I use SQL session state, instead of just creating a custom table to store data in the db.
Aros
A: 

Seems like SQL session state is the way to go if you need your data to expire, otherwise a custom database table seems like the way to go. Especially when using entity framework, less work to setup and you get a strongly typed object. No Session["VarName"] stuff..

Aros