Microsoft TS: Accessing Data with Microsoft .NET Framework 4 Sample Questions:
1. You use Microsoft .NET Framework 4.0 to develop an application that uses Entity Framework. The application includes the following Entity SQL (ESQL) query.
SELECT VALUE product FROM AdventureWorksEntities.Products AS product ORDER BY product.ListPrice
You need to modify the query to support paging of the query results. Which query should you use?
A) SELECT TOP Stop VALUE product FROM AdventureWorksEntities.Products AS product ORDER BY product.ListPrice SKIP @skip
B) SELECT SKIP @skip TOP Stop VALUE product FROM AdventureWorksEntities.Products AS product ORDER BY product.ListPrice
C) SELECT VALUE product FROM AdventureWorksEntities.Products AS product ORDER BY product.ListPrice SKIP @skip LIMIT @limit
D) SELECT SKIP @skip VALUE product FROM AdventureWorksEntities.Products AS product ORDER BY product.ListPrice LIMIT @limit
2. You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application.
The application connects to a Microsoft SQL Server 2008 database.
You need to ensure that the application calls a stored procedure that accepts a table-valued parameter.
You create a SqlParameter object. What should you do next?
A) Set the ParameterDirection of SqlParameter to Output.
B) Set the SqlDbType of SqlParameter to Variant.
C) Set the SqlDbType of SqlParameter to Structured. Set the TypeName of SqlParameter to Udt.
D) Set the SqlDbType of SqlParameter to Udt.
3. You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application that
connects to a database by using the Entity Framework.
You create an Entity Data Model (EDM) by using the Generate from database wizard for the following
tables.
You need to ensure that the EDM contains an entity type named Employee that contains all of the data from
both tables.
What should you do?
A) Delete the EmployeeAccess entity, create a new property named CanAccessBuildings on the Employee entity, and add a mapping for the new property.
B) Modify the .edmx file to include the following line of code. <NavigationProperty Name="Type" FromRole="EmployeeAccess" ToRole="Employee" />
C) Create a one-to-one association named CanAccessBuildingsAssociation between the EmployeeAccess entity and the Employee entity.
D) Create an inheritance relationship between the Employee and EmployeeAccess entities, and use CanAccessBuildings as an inheritance condition.
4. You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to develop an application.
You use the Entity Framework Designer to create an Entity Data Model (EDM).
You need to create a database creation script for the EDM. What should you do?
A) Run the Generate Database command.
B) Use a new Self-Tracking Entities template.
C) Select Run Custom Tool from the solution menu.
D) Drag entities to Server Explorer.
5. You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to develop an ASP.NET Web application that uses the Entity Framework.
The build configuration is set to Release. The application must be published by using Microsoft Visual Studio 2010, with the following requirements:
-The database schema must be created on the destination database server.
-The Entity Framework connection string must be updated so that it refers to the destination database server.
You need to configure the application to meet the requirements. Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
A) Include the source database entry in the Package/Publish SQL tab and update the connection string for the destination database.
B) Set Items to deploy in the Package/Publish Web tab to All files in this Project Folder for the release configuration.
C) Use the web.config transform file to modify the connection string for the release configuration.
D) Generate the DDL from the Entity Framework Designer and include it in the project. Set the action for the DDL to ApplicationDefinition.
Solutions:
| Question # 1 Answer: C | Question # 2 Answer: C | Question # 3 Answer: A | Question # 4 Answer: A | Question # 5 Answer: A,C |














1157 Customer Reviews
Quality and ValueITCertKing Practice Exams are written to the highest standards of technical accuracy, using only certified subject matter experts and published authors for development - no all study materials.
Tested and ApprovedWe are committed to the process of vendor and third party approvals. We believe professionals and executives alike deserve the confidence of quality coverage these authorizations provide.
Easy to PassIf you prepare for the exams using our ITCertKing testing engine, It is easy to succeed for all certifications in the first attempt. You don't have to deal with all dumps or any free torrent / rapidshare all stuff.
Try Before BuyITCertKing offers free demo of each product. You can check out the interface, question quality and usability of our practice exams before you decide to buy.
