In addition, you saw how to use LINQ to SQL and
the DataContext class to manipulate data, such as adding, updating, and deleting data in SQL Server.
Associating relational database objects to LINQ to SQL generic collections and submitting them to the
database for execution was also discussed, and you looked at several examples illustrating how to execute
stored procedures and user-defined functions using LINQ to SQL.
Chapter 12 tackles a few advanced LINQ to SQL query topics.
244
Advanced Query Concepts
There is so much that LINQ to SQL can do that applies to relational data and working with relational
databases, that a chapter dedicated to the tight coupling of LINQ to SQL and relational data
is warranted. For example, LINQ to SQL supports transactions and composite keys, and these types
of topics are usually not found or discussed in an introductory-level chapter. Therefore, this chapter
focuses on the following topics, which are a bit more advanced:
??‘ Database relationships
??‘ Compiled queries
??‘ Query execution location
??‘ Deferred versus immediate
??‘ Composite keys
??‘ Read-only data
Transactions are discussed in Chapter 13.
Pages:
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395