PrepAway - Latest Free Exam Questions & Answers

What should you do?

You use Microsoft .NET Framework 4.0 to develop an application that uses LINQ to SQL.
The Product entity in the LINQ to SQL model contains a field named Productlmage. The Productlmage field holds a large amount of binary data.
You need to ensure that the Productlmage field is retrieved from the database only when it is needed by the application. What should you do?

PrepAway - Latest Free Exam Questions & Answers

A.
Set the Update Check property on the Productlmage property of the Product entity to Never.

B.
Set the Auto-Sync property on the Productlmage property of the Product entity to Never.

C.
Set the Delay Loaded property on the Productlmage property of the Product entity to True.

D.
When the context is initialized, specify that the Productlmage property should not be retrieved by using DataLoadOptions

Explanation:
Lazy loading is configured in the LINQ to SQL designer by selecting an entity and then, in
the Properties window, setting the Delay Loaded property to true.The Delay Loaded property indicates that you want lazy loading of the column.

CHAPTER 4 LINQ to SQL
Lesson 1: What Is LINQ to SQL?
Eager Loading vs. Lazy Loading (page 254)

http://geekswithblogs.net/AzamSharp/archive/2008/03/29/120847.aspx
http://weblogs.asp.net/scottgu/archive/2007/05/29/linq-to-sql-part-2-defining-our-data-model-classes.aspx


Leave a Reply