Q1. DRAG DROP - (Topic 2)
The GetVendorPolicy() private method in the ProcessedOrderController controller is returning a
CacheItemPolicy object with default values. The returned policy must expire if the external file located at C:\Triggers\VendorTrigger.txt has been modified or the timeout outlined in the technical requirements is reached.
You need to return the policy.
How should you build the method? (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:
Q2. DRAG DROP - (Topic 4)
You are developing a RESTful application by using ASP.NET MVC. The application is a pet management system and implements the following method in a controller for retrieving pet data.
The method must only accept JSON data using the standard MIME type.
You need to implement a controller that saves pet data and return a properly formatted
HTTP/1.1 protocol response.
You have the following code:
Which code segments should you include in Target 1, Target 2, Target 3 and Target 4 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:
Q3. - (Topic 4)
You are developing an ASP.NET MVC application that displays a report. The report includes large images that are stored in a database. Members of the EntityClient namespace are used to access the database through the ADO.NET Entity Framework data model.
You need to prevent memory exceptions while generating a report using the EntityDataRcader type.
Which CommandBehavior type should you use?
A. FastForwardReadOnly
B. SequentialAccess
C. SingleResult
D. SingleRow
Answer: B
Explanation: SequentialAccess Provides a way for the DataReader to handle rows that contain columns with large binary values. Rather than loading the entire row, SequentialAccess enables the DataReader to load data as a stream.
Q4. - (Topic 3)
The PurchaseOrders.xml file contains all of the purchase orders for the day. You need to query the XML file for all of the billing addresses.
Which code segment should you use?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: D
Q5. DRAG DROP - (Topic 4)
You are developing an ASP.NET MVC Web API image management application.
The application must meet the following requirements:
It must send or receive image data without the use of a buffer.
It must allow up to 4 MB of image data to be received.
It must allow up to 3 MB of image data to be sent.
You need to complete the code to meet the requirements.
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:
Q6. DRAG DROP - (Topic 4)
You are developing an ASP.NET Web API application for currency conversion that will be consumed by a web browser by using a composite application that is served from another web domain.
You need to configure the Web API.
What should you do? (To answer, drag the appropriate XML elements to the correct location or locations in the answer area. Each XML 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:
Q7. - (Topic 4)
You are developing an application in Visual Studio 2012 to display student information. The application contains the following Entity Framework model.
The application contains a WCF data service named DirectoryService.svc.
You need to create a query expression to display all of the grades for students whose first name is "John"
How should you build the expression?
A. http://localhost:54946/DirectoryService.svc/Students?$filter=FirstName eq 'John' &$expand=Grades
B. http://localhost:54946/DirectoryService.svc/Students?$filter=FirstName eq 'John'/Grades
C. http://localhost:54946/DirectoryService.svc/Students?$filter=FirstName = 'John' &$expand=Grades
D. http://localhost:54946/DirectoryService.svc/Grades/Students?$filter=FirstName eq 'John'
Answer: A
Q8. - (Topic 4)
You are developing a new ASP.NET MVC application that does not have an existing database.
The requirements for the application are not complete, and the SQL data model will likely change.
You need to choose an approach to visually manage a data model.
Which approach should you use?
A. Physical First
B. Database First
C. Code First
D. Model First
Answer: D
Explanation: With the model first workflow, you can design a model in a designer.
Q9. DRAG DROP - (Topic 4)
You are developing a self-hosted WCF service to display data about books. The solution contains a service named BookService that implements the IBookService interface.
You need to expose the metadata in the service host programmatically.
You have the following code:
Which code segments should you include in Target 1, Target 2, Target 3, Target 4 and Target 5 to build the service host? (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:
Q10. DRAG DROP - (Topic 2)
You need to create the ShippingContext class in the ShippingAddress.es file to meet the requirements.
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:
Q11. - (Topic 2)
The DeleteExternalOrder() method in the ExternalQueueService service is not throwing a FaultException exception as defined by the FaultContractAttribute attribute in the IExternatQueueService.cs file.
You need to throw the FaultException exception.
Which code segment can you insert at line EQ45 to achieve this goal? (Each correct answer presents a complete solution. Chose all that apply.)
A. Option A
B. Option B
C. Option C
D. Option D
Answer: C
Q12. DRAG DROP - (Topic 2)
The UploadOrder() method in the UploadCallbackService service is not implementing the callback behavior defined in the IUploadCallBackService interface.
You need to modify the class to implement the required callback behavior.
What should you do? (To answer, drag the appropriate code segments to the correct location or locations in the answer area. Each code segments 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:
Q13. - (Topic 3)
You need to update the CreateMonthlyTotalsReports() method to use database transactions.
Which code segment should you use?
A. SqlConnection.BeginTransaction(IsolationLevel.ReadCommitted);
B. SqlConnection.BeginTransaction(IsolationLevel.ReadUnconwited);
C. SqlConnection.BeginTransaction(IsolationLevel.Chaos);
D. SqlConnection.BeginTransaction(IsolationLevel.Serializable);
Answer: D
Explanation: * Scenario: The Create MonthlyTotalsReport() method must lock the data and prevent others from updating or inserting new rows until complete.
* Serializable:
A range lock is placed on the DataSet, preventing other users from updating or inserting
rows into the dataset until the transaction is complete.
Q14. - (Topic 4)
You are developing an ASP.NET MVC application that reads and writes data from a SQL Server database.
You need to maintain data integrity including retrieving identical sets across reads in all situations that use transactions.
Which isolation level should you use?
A. Repeatable
B. Serializable
C. ReadUncommitted
D. ReadCommitted
Answer: A
Explanation: REPEATABLE READ Specifies that statements cannot read data that has been modified but not yet committed by other transactions and that no other transactions can modify data that has been read by
the current transaction until the current transaction completes.
Q15. - (Topic 2)
The GetExternalOrder() method in the ExternalQueueService service is throwing a runtime error. The method must query the database for a record that matches the orderNum parameter passed to the method.
You need to modify the queryString string to retrieve the record. With which code segment should you replace line EQ64?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: C
Q16. 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: