Understanding LINQ to SQL Classes
To access SQL Server databases with LINQ to SQL, you need a LINQ to SQL class. This kind of class is generated by Visual Studio when you select members for the new object model and contains all the Visual Basic code that represents tables, columns, and relationships. Adding a LINQ to SQL class is also necessary to enable the Visual Studio OR/M Designer for LINQ to SQL. To understand what these sentences mean, follow these preliminary steps:
• Create a new project for the Console and name it LinqToSql.
• Establish a connection to the Northwind database via the Server Explorer tool window (or the Database Explorer if you work with Visual Basic Express).
• In Solution Explorer, right-click the project name and select ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access