Chapter 8. LINQ to SQL Server
In This Chapter
Using SQL Server databases with LINQ
Getting and installing the Northwind database
Developing a simple SQL Server query
Creating LINQ to SQL entity classes with Object Relational Designer
Working with the SQL Server operators
The LINQ to SQL provider helps you create the complex connections required by SQL Server databases and query those sources quickly. The use of LINQ to SQL as the name for this provider is a bit of a misnomer. You can use the provider only with SQL Server. If you want to create a connection to another kind of a database, you must use the LINQ to DataSet provider at this time. Microsoft may eventually update LINQ to SQL so that it lives up to its name.
Don't get the idea, however, that LINQ to SQL lacks functionality. This provider builds on the functionality of both LINQ to Object and LINQ to DataSet to provide a significant set of database query and manipulation features. As with LINQ to DataSet, you can use the features found in LINQ to SQL to modify database content, as well as work with structural elements. Of course, you still want to use the native functionality that Microsoft provides with Visual Studio to perform most maintenance tasks. LINQ to SQL augments this native functionality and makes SQL Server easier to work with.
Besides showing you how to create basic LINQ queries with SQL Server, this chapter also explores the operations, entity classes, and operators that LINQ provides to work with SQL Server. These ...
Get LINQ For Dummies® 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.