[Your]DataContext Class

While I haven't covered it yet, one of the LINQ to SQL classes you will frequently use is the System.Data.Linq.DataContext class. This is the class you will use to establish your database connection. When creating or generating entity classes, it is common for a class to be created that derives from the DataContext class. This derived class will typically take on the name of the database it will be connecting to. Since I am using the Northwind database for the examples in this chapter, my derived database class will be named Northwind. However, since the name of the derived class changes with the database being used, the name of the class will vary from code to code. For ease of reference in the LINQ to SQL chapters, ...

Get Pro LINQ: Language Integrated Query in C# 2008 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.