Provides LINQ (Language Integrated Query) access to, and change tracking for, the lists and document libraries of a Microsoft SharePoint Foundation Web site.
Assembly: Microsoft.SharePoint.Linq (in Microsoft.SharePoint.Linq.dll)
You can use the existing class to represent the data of a Web site, but there are advantages to deriving your own class. The SPMetal tool will automatically declare a class derived from . This class will be marked partial (Partialin Visual Basic) so you can add members to it in a separate code file that is not overwritten whenever SPMetal regenerates code. Also, the class generated by SPMetal will have the signatures of a partial method named OnCreated that is called in the class’s constructors. You can implement OnCreated in the other code file to, for example, initialize members you have declared in that code file.