Q1. - (Topic 4)
You are developing an ASP.NET MVC application. The application has a page that searches for and displays an image stored in a database. Members of the EntityClient namespace are used to access an ADO.NET Entity Framework data model. Images and associated metadata are stored in a database table.
You need to run a query that returns only the image while minimizing the amount of data that is transmitted.
Which method of the EntityCommand type should you use?
A. ExecuteScalar
B. ExecuteDbDataReader
C. ExecuteReader
D. ExecuteNonQuery
Answer: A
Explanation: ExecuteScalar
Executes the command, and returns the first column of the first row in the result set.
Additional columns or rows are ignored.
Q2. - (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:
Q3. 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:
Q4. - (Topic 4)
You are developing a WCF service that compares several data sources. The service takes a long time to complete.
The service must meet the following requirements:
. The client must be able to continue processing while the service is running. . The service must initiate communication with the client application when processing is complete.
You need to choose a message pattern to meet the requirements.
Which message pattern should you choose?
A. One Way
B. Streaming
C. Duplex
D. Request/Reply
Answer: C
Q5. - (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
Q6. DRAG DROP - (Topic 4)
You are developing a WCF service. The service will stream messages to clients on the internal network.
You must use Windows Authentication, and all messages must be binary encoded.
You need to configure the service.
What should you do? (To answer, drag the appropriate elements to the correct location or locations in the answer area. Each 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. 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:
Q8. 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:
Q9. - (Topic 3)
You are preparing to write the data access code for the children’s book area of the web site.
You need to review the requirements and identify the appropriate data access technology.
What should you do?
A. Use ADO.NET Entity Framework.
B. Use a Web Service.
C. Use the WCF Data Services.
D. Use LINQ to SQL.
Answer: A
Q10. - (Topic 1)
You need to load flight information provided by Consolidated Messenger. What should you use?
A. Office Open XML
B. COM interop
C. OleDbConnection and OleDbDataReader
D. EntityConnection and EntityDataReader
Answer: C