You are creating a Windows application by using the .NET Framework 3.5.
The application will be used for telephone directory management.
The application has the following specifications:
It stores data in a Microsoft SQL Server 2008 database instance.
It uses the LINQ to SQL model.
It stores the photograph of each directory member in the Picture column of the DirectoryEntry table.
It displays the directory information in a DataGridView control.
It supports expansion of rows of the DataGridView control to display the complete photograph of the
directory member.
The application is frequently used across remote or slow database connections.
You need to implement the lazy load technique to load the photographs from the database. You also need
to ensure that the implementation has minimum effect on the database connection.
What should you do?
A.
Configure the Picture property of the DirectoryEntry entity in the LINQ to SQL model.
Set the Delay Loaded property to True.
B.
Identify the DataGridView column that contains the photograph. Set the Visible property of the column
to False.
Identify the DataGridView column that contains the photograph. Set the Visible property of the column to
True when the row that contains the photograph is expanded.
C.
Create a DataLoadOptions object in the method that is used to execute the LINQ query.
Call the LoadWith method of the object along with the de => de.Picture statement.
Use the DataLoadOptions object when the statement is executed.
D.
Modify the method that executes the LINQ query to accept a Boolean parameter which indicates
whether a photograph is to be loaded.
Include a data-shaping clause to exclude the Picture column from the list of columns that are returned if
the Boolean parameter is False.
Execute the method initially by setting the Boolean parameter to True.
Repeat the method execution by setting the Boolean parameter to False when the DataGridView row is
expanded.