For my current project I'm using LINQ to SQL as ORM. For now I'm storing modified entities in session to save changes made between ASP.NET requests. What is the best practise for doing this, because lately I started seing this approach is not very scalable for the Web farms.
views:
87answers:
2I personally wouldn't do it at all. I know it's possible to re-attach the entities but that isn't trivial and I'm genuinely struggling to think of a benefit to doing this over other methods of maintaining state.
There's a nice article here which says there are pros and cons to various methods but I'd be interested to know what the pros are!
Do you mean it isn't scaling for your web farm because you have InProc Session or because the more general process is not scaling? My opinion would be that if you have InProc Session and thus it won't work over a web farm, then you'll have to go out of process somewhere to save that data and so you might as well commit to the database. But, if you have a special circumstance you may want to explain it to get a better answer.