Posts tagged LINQ SQL DataContext
Using LINQ To SQL’s DataContext in a Multi-Tier Application
Jan 3rd
I’m still reading the excellent C# 3.0 in a Nutshell: A Desktop Quick Reference (In a Nutshell (O’Reilly)), by Ben and Joseph Albahari. It answers a popular question: how do I use a DataContext object in LINQ within a multi-tier application?
According to the authors, you cannot use the DataContext at an application or static level, or use a single instance for all requests, as it is not thread-safe. It has to be recreated for each request.
I need to look into this more.
