You need to ensure that all the requested data is retrieved

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The
application connects to a Microsoft SQL Server database. The application uses the ADO.NET LINQ to
SQL model to retrieve data from the database. The application will not modify retrieved data. You
need to ensure that all the requested data is retrieved. You want to achieve this goal using the
minimum amount of resources. What should you do?

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The
application connects to a Microsoft SQL Server database. The application uses the ADO.NET LINQ to
SQL model to retrieve data from the database. The application will not modify retrieved data. You
need to ensure that all the requested data is retrieved. You want to achieve this goal using the
minimum amount of resources. What should you do?

A.
Set DeferredLoadingEnabled to true on the DataContext class.

B.
Set DeferredLoadingEnabled to false on the DataContext class.

C.
Set ObjectTrackingEnabled to true on the DataContext class.

D.
Set ObjectTrackingEnabled to false on the DataContext class.

Explanation:
Setting property ObjectTrackingEnabled to false improves performance at retrieval time, because
there are fewer items to track.
DataContext.ObjectTrackingEnabled Property
(http://msdn.microsoft.com/en-us/library/system.data.linq.datacontext.objecttrackingenabled.aspx)



Leave a Reply 0

Your email address will not be published. Required fields are marked *