QUESTION NO: 1
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The application connects to a Microsoft SQL Server database. You use the ADO.NET Entity Framework to model entities.
You need to add a new type to your model that organizes scalar values within an entity. You also need to map stored procedures for managing instances of the type.
What should you do?
A. Add the stored procedures in the SSDL file along with a Function attribute. Define a complex type in the CSDL file. Map the stored procedure in the MSL file with a
ModificationFunctionElement.
B. Add the stored procedures in the SSDL file along with a Function attribute. Define a complex type in the CSDL file. Map the stored procedure in the MSL file with an AssociationEnd element.
C. Use the edmx designer to import the stored procedures. Derive an entity class from the existing entity as a complex type. Map the stored procedure in the MSL file with an AssociationEnd element.
D. Add the stored procedures in the SSDL file along with a Function attribute. Derive an entity class from the existing entity as a complex type. Map the stored procedure in the MSL file with a ModificationFunctionElement.
Answer: A
Explanation:
QUESTION NO: 2
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to develop an application that uses the Entity Framework.
You need to execute custom logic when an entity is attached to the ObjectContext. What should you do?
A. Create a partial method named OnStateChanged in the partial class for the entity.
B. Create a partial method named OnAttached in the partial class for the entity.
C. Create an event handler to handle the ObjectStateManagerChanged event.
D. Create an event handler to handle the ObjectMaterialized event.
Answer: C
Explanation:
QUESTION NO: 3
You use Microsoft Visual Studio 2010 and Microsoft ADO.NET Framework 4 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?
A. Apply the FunctionAttribute and ResultTypeAttribute to the stored procedure function. Use the GetResult method to obtain an enumerator of the correct type.
B. Apply the FunctionAttribute and ParameterAttribute to the stored procedure function and directly access the strongly typed object from the results collection.
C. Apply the ResultTypeAttribute to the stored procedure function and directly access the strongly typed object from the results collection.
D. Apply the ParameterAttribute to the stored procedure function. Use the GetResult method to obtain an enumerator of the correct type. MCITP Certification
Answer: A
Explanation:





About us