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 LINQ to SQL model contains the Product entity.
A stored procedure named GetActiveProducts performs a query that returns the set of active products from the database.
You need to invoke the stored procedure to return the active products, and you must ensure that the LINQ to SQL context can track changes to these entities. What should you do?

PrepAway - Latest Free Exam Questions & Answers

A.
Select the Product entity, view the entity�s property window, and change the Name for the entity to GetActiveProducts.

B.
Add a property named GetActiveProducts to the Product entity.

C.
Navigate to the GetActiveProducts stored procedure in Server Explorer, and drag the procedure onto the Product entity in the LINQ to SQL model designer surface.

D.
Select the Product entity, view the entity�s property window, and change the Source for the entity to GetActiveProducts.

Explanation:
http://weblogs.asp.net/scottgu/archive/2007/08/16/linq-to-sql-part-6-retrieving-data-using-stored-procedures.aspx


Leave a Reply