In this chapter, we have learned some advanced features of LINQ to SQL. At this point, we have a good understanding of LINQ to SQL. In the next chapter, we will apply these skills to the data access layer of our WCF service, to connect to databases securely and reliably with LINQ to SQL.
The key points covered in this chapter include:
LINQ to SQL fully supports stored procedures with return codes, output parameters, and multiple result sets
Compiled queries can increase the performance of repeatedly-executed LINQ queries
LINQ to SQL allows SQL queries to the database
Dynamic Queries can be built at runtime, using Expressions
LINQ to SQL supports single-table inheritance via the discriminator column
Concurrent updates can be controlled using an Update Check property or a Version column
By default, LINQ to SQL updates are within one implicit transaction
Explicit transactions can be defined for LINQ to SQL updates by using TransactionScope
LINQ to SQL updates can also participate in traditional ADO.NET transactions
Customized validation code can be added to LINQ to SQL entity classes
A debugging process may trigger a real query to the database