70-516 · Question #177
You use Microsoft Visual Studio 2010 and Microsoft ADO.NET Framework 4.0 to create an application. The application connects to a Microsoft SQL Server 2008 database. You use the ADO.NET LINQ to SQL…
The correct answer is A. Apply the FunctionAttribute and ResultTypeAttribute to the stored procedure function. You must use the IMultipleResults.GetResult<TElement> Method pattern to obtain an enumerator of the correct type, based on your knowledge of the stored procedure. FunctionAttribute Associates a method with a stored procedure or user-defined function in the…
Question
You use Microsoft Visual Studio 2010 and Microsoft ADO.NET Framework 4.0 to create an application. The application connects to a Microsoft SQL Server 2008 database. You use the ADO.NET LINQ to SQL model to retrieve data from the database. You use stored procedures to return multiple result sets. You need to ensure that the result sets are returned as strongly typed values. What should you do?
Options
- AApply the FunctionAttribute and ResultTypeAttribute to the stored procedure function.
- BApply the FunctionAttribute and ParameterAttribute to the stored procedure function and
- CApply the ResultTypeAttribute to the stored procedure function and directly access the
- DApply the ParameterAttribute to the stored procedure function.
How the community answered
(50 responses)- A78% (39)
- B2% (1)
- C14% (7)
- D6% (3)
Explanation
You must use the IMultipleResults.GetResult<TElement> Method pattern to obtain an enumerator of the correct type, based on your knowledge of the stored procedure. FunctionAttribute Associates a method with a stored procedure or user-defined function in the IMultipleResults.GetResult<TElement> Method
Topics
Community Discussion
No community discussion yet for this question.