PrepAway - Latest Free Exam Questions & Answers

You need to invoke the stored procedure to return the active products, and you must ensure that the UNQ to SQL

You use Microsoft .NET Framework 4 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 UNQ to SQL context can track changes to these entities. What should you do?

PrepAway - Latest Free Exam Questions & Answers

A.
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.

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

C.
Select the Product entity, view the ‘entity’s property window, and change the Name for the entity
to GetActiveProducts.

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-storedprocedures.aspx


Leave a Reply