This comes in handy when dealing with more complex queries.
Returning data in read-only form also was discussed. If you don??™t plan to do any data modification, then
you??™ll gain some performance increases by retrieving data read-only.
Chapter 13 tackles entity classes in detail.
256
More about Entity Classes
There??™s more that can be said about LINQ to SQL entity classes because they provide a lot more
functionality than what you??™ve explored so far in this book. LINQ to SQL is all about managing
entities, or objects, during their lifetime of service. As you??™ve already seen, one of the primary
things about entities is that they provide a lot of functionality aimed at dealing with querying data
and, just as importantly, maintaining the integrity of your data through relationships.
More significantly, though, the LINQ to SQL entities (objects) used when executing queries can be
changed and manipulated as needed by the application during the lifetime of the query. The data
associated with those entities also can be changed.Modifications are then ushered back to the server
when the application is done with the objects.
Pages:
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414