FirstName = "Scott"
select con;
Several words of caution: If you set this property to false and then call SubmitChanges, an exception
will be thrown because there are no changes to submit. An exception also will be thrown if you set this
property to false after executing a query.
Summary
This chapter explored a few topics that are meant to enhance the performance and functionality of your
LINQ to SQL queries. The most important topic was that of database relationships??”how to define them,
and then query across them.
The next topic covered was compiled queries, how they are created, and how they can be used in your
application. Compiled queries can save a lot of processing overhead if used correctly, since multiple calls
to the database do not need to be made.
You took a look at query execution location and how data is loaded, learning how to manage much of the
performance of your application by controlling where the queries are executed and whether the query
execution is done immediately or deferred.
Composite keys were discussed to help you overcome the problem of passing multiple arguments where
only one argument is accepted.
Pages:
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413