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 1)
Data provided by Consolidated Messenger is cached in the HttpContext.Cache object.
You need to ensure that the cache is correctly updated when new data arrives.
What should you do?
A. Ensure that the EffectivePrivateBytesLimit value is greater than the size of the database file.
B. Change the sliding expiration of the cache item to 12 hours.
C. Use the SqlCacheDependency type configured with a connection string to the database file.
D. Use the CacheDependency type configured to monitor the SFTP target folder.
Answer: D
Q3. DRAG DROP - (Topic 4)
You are developing an ASP.NET Web API for a home inventory management system. You need to limit access to users with IP addresses based only in the United States. You have the following code:
Which code segments should you include in Target 1 and Target 2 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:
Q4. DRAG DROP - (Topic 4)
You are developing an ASP.NET MVC Web API application.
The method names of the Web API must match naming guidelines for RESTful services.
You need to create methods to support standard insert, select, update, and delete
operations in an HTTP service.
What should you do? (To answer, drag the appropriate HTTP methods to the correct row in
the table in the answer area. Each HTTP method 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:
Q5. - (Topic 2)
The QueueDetail entity type must inherit from the InboundQueue entity type in the ExternalQueue service project using table-per-type inheritance.
You need to modify the entities in the designer.
What should you do? (Each correct answer presents part of the solution. Choose all that apply.)
A. Remove the OrderNum property in InboundQueue.
B. Remove the OrderNum property in QueueDetail.
C. Set the QueueDetail BaseType to InboundQueue.
D. Remove the association between the entities.
E. Right-click the entities and validate the table mapping.
F. Set the InboundQueue BaseType to QueueDetail.
Answer: B,C,D,E
Explanation: http://www.robbagby.com/entity-framework/entity-framework-modeling-table-per-type-inheritance/
Q6. - (Topic 3)
You need to configure the server to self-host the bookstore's Web API application. Which code segment should you use?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: C
Explanation: MapHttpRoute Method Maps the specified route template. Use the option with "api/…
Q7. - (Topic 2)
The GetVendors() action in the ProcessedOrderController controller is querying the database each time it is run. The GetVendors() action must query the database only if the cache is null.
You need to add code to the action at line PC33 to cache the data.
Which code segment can you use? (Each correct answer presents a complete solution. Choose all that apply.)
A. cache.Set(new CacheItem("vendorKey", vendors), GetVendorPolicy());
B. cache.Add("vendors", vendors, new CacheItemPolicy());
C. cache.Add(new CacheItem("vendorKey", vendors) , GetVendorPolicy());
D. cache.AddOrGetExisting("vendorKey", context, new CacheItemPolicy());
Answer: A,C
Q8. DRAG DROP - (Topic 4)
You are developing an ASP.NET MVC Web API application.
The methods of the Web API must return details about the result of the operation. You need to create a method to add products.
You have the following code:
Which code segments should you include in Target 1, Target 2, Target 3, Target 4 and Target 5 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:
Q9. DRAG DROP - (Topic 4)
You are developing a .NET application that uses the HttpClient type to access an ASP.NET Web API application.
You need to add a header to specify that data is returned as JSON. You have the following code:
Which code segments should you include in Target 1 and Target 2 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:
Q10. - (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
Q11. - (Topic 4)
You develop an ASP.NET MVC application that is secured by using SSL. You are ready to
deploy the application to production.
The deployment package must include the installation of the SSL certificate.
You need to configure the deployment package to meet the requirement.
What should you do?
A. Create a web publish pipeline target file with a custom web deploy target.
B. In the Package/Publish settings of the project, select the All Files in this project option.
C. Extend the CopyAllFilesToSingleFolder target in the project file.
D. In the Build Events settings of the project, configure a pre-build event to include the SSL certificate.
Answer: A
Q12. DRAG DROP - (Topic 1)
Flight information data provided by Margie's Travel is updated both locally and remotely. When the data is synced, all changes need to be merged together without causing any data loss or corruption.
You need to implement the Sync() method in the MargiesTravelSync.es file.
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:
Q13. - (Topic 4)
You are preparing to develop a set of libraries for a company.
The libraries must be shared across the company.
You need to create a remote NuGet feed that exposes the libraries.
What should you do? (Each answer presents part of the solution. Choose all that apply.)
A. Install the NuGet.Feed Package.
B. Install the NuGet.Server Package.
C. Configure the Packages folder located in the system.webserver section of the web application's Web.config.
D. Create a new Empty Web Site in Visual Studio 2012.
E. Configure the Packages folder located in the appSettings section of the web application's Web.config.
F. Add packages to the Packages folder.
G. Create a new Empty Web Application in Visual Studio 2012.
Answer: B,E,F,G
Explanation: Explanation/Reference:
Q14. 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", "Vendor Id": 9823, "Items": ["Apples", "Oranges"] }
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:
Q15. DRAG DROP - (Topic 1)
You need to parse flight information from Blue Yonder Airlines. The content of the XML file is shown below.
Some airlines do not specify the timezone of the arrival time. If the timezone is not specified, then it should be interpreted per the business requirements.
You need to implement the LoadFlights() and Parse() methods of the BlueYonderLoader class.
What should you do? (To answer, drag the appropriate code segments to the correct location in the answer area. Each 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:
Q16. - (Topic 1)
You are adding a new REST service endpoint to the FlightDataController controller. It
returns flights from the consolidated data sources only for flights that are late.
You need to write a LINQ to Entities query to extract the required data.
Which code segment should you use?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: D
Explanation: Explanation/Reference:
D is right because you send result as REST so if you use “AsQueryable” the result is
deferred to the next enumeration of your result.
D is not optimized but will works.
A will break at runtime.
Credits to Rem