Q1. DRAG DROP - (Topic 3)
An XML file must be produced by the SaveFeaturedBooks() method of the Book class. The
schema of the resulting XML file must be identical to the FeaturedBooks.xml file.
You need to write the code to produce the file.
You have the following code:
Which code segments should you include in Target 1, Target 2 and Target 3 to complete the code? (To answer, drag the appropriate code segments to the correct targets in the answer area. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content)
Answer:
Q2. - (Topic 4)
You are developing an ASP.NET MVC application.
Applications can be deployed to remote servers only by administrators who have elevated privileges. The administrators do not have access to Visual Studio 2012.
You need to select a deployment tool to deploy the application to remote servers for testing.
Which tool should you use?
A. Copy Web Site Tool
B. One-Click Publish
C. Publish Web Site Tool
D. Web Deployment Package
Answer: D
Q3. - (Topic 4)
You are developing an ASP.NET MVC application. The application is an order processing system that uses the ADO.NET Entity Framework against a SQL Server database. It has a controller that loads a page that displays customers. Customers are filtered on Country and, if provided, on CompanyName.
You have an Entity Framework context named db.
The Customer class is shown below.
You need to execute a single deferred query to return the filtered list of customers. Which code segment should you use?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: C
Q4. - (Topic 2)
You need to modify the ExecuteCommandProcedure() method to meet the technical requirements.
Which code segment should you use?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: A
Q5. DRAG DROP - (Topic 4)
You have a UI element library.
You need to build a NuGet package to integrate the library into your projects.
What should you do? (To answer, drag the appropriate code elements to the correct
location or locations in the answer area. Each code element may be used once, more than
once, or not at all. You may need to drag the split bar between panes or scroll to view content.)
Answer:
Q6. HOTSPOT - (Topic 4)
You are developing an ASP.NET MVC application. It is ready for deployment to the production web server.
A local SQL Express .MDF file was used by the application during development
The deployment has the following requirements:
. The deployment must merge the assemblies on the local machine with those on the host. . The deployment must publish the local database to the remote Microsoft SQL server.
You need to configure the web package settings for deployment.
Which settings should you use? (To answer, select the appropriate setting or settings in the answer area.)
Answer:
Q7. DRAG DROP - (Topic 4)
You are developing an ASP.NET Web API action method.
The action method must return the following JSON in the message body.
{"Name": "Fabrikam", "VendorId" :9823, Items": ["Dogs", "Cats") >
You need to return an anonymous object that is serialized to JSON.
What should you do? (To answer, drag the appropriate code segments to the correct
location or locations in the answer area. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)
Answer:
Q8. - (Topic 4)
You are developing an ASP.NET MVC application. The application is an order processing system that uses the ADO.NET Entity Framework against a SQL Server database. It has a controller that loads a page that displays all orders along with customer information. Lazy loading has been disabled.
The Order class is shown below.
You need to return the orders and customer information in a single round trip to the database.
Which code segment should you use?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: A
Q9. - (Topic 4)
You are developing a WCF service.
A new service instance must be created for each client session.
You need to choose an instancing mode.
Which instance mode should you use?
A. PerCall
B. Single
C. Multiple
D. PerSession
E. PerRequest
Answer: D
Q10. - (Topic 4)
You are developing a WCF service.
You need to create a duplex contract.
What should you do? (Each correct answer presents part of the solution. Choose all that apply.)
A. Apply the MessageContractAttribute attribute to every public method signature included in the appropriate contract.
B. Create an interface for the client-side duplex contract.
C. Create an interface for the server-side duplex contract.
D. Apply the MessageContractAttribute attribute to the appropriate interface.
E. Apply the ServiceContractAttribute attribute to the appropriate interface. Then, apply the OperationContractAttribute attribute to every public method signature included in that contract.
F. Set the CallbackContract property to the appropriate interface.
Answer: C,E,F
Explanation: To create a duplex contract
(C) Create the interface that makes up the server side of the duplex contract.
(E) Apply the ServiceContractAttribute class to the interface.
Declare the method signatures in the interface.
(E)Apply the.OperationContractAttribute.class to each method signature that must be part of the public contract.
Create the callback interface that defines the set of operations that the service can invoke on the client.
Declare the method signatures in the callback interface.
Apply the.OperationContractAttribute.class to each method signature that must be part of the public contract.
(F)
Link the two interfaces into a duplex contract by setting
the.CallbackContract.property in the primary interface to the type of the callback
interface.
Reference: How to: Create a Duplex Contract