Q1. - (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
Q2. DRAG DROP - (Topic 2)
The GetExternalOrders() method must use members of the EntityClient namespace to query the database for all records in the InboundQueue entity.
You need to modify the GetExternalOrders() method to return the correct data.
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:
Q3. - (Topic 3)
You need to choose the appropriate data access technology for the cookbook area of the web application.
Which data access technology should you choose?
A. WCF Data Services
B. LINQ to SQL
C. Entity Framework
D. ADO.NET
Answer: A
Explanation: * Scenario: The cookbook functionality is contained within a client-side application that must connect to the server using HTTP and requires access to the data using JavaScript.
* WCF Data Services (formerly known as "ADO.NET Data Services") is a component of the
.NET Framework that enables you to create services that use the Open Data Protocol (OData) to expose and consume data over the Web or intranet by using the semantics of representational state transfer (REST). OData exposes data as resources that are addressable by URIs. Data is accessed and changed by using standard HTTP verbs of GET, PUT, POST, and DELETE
* WCF Data Services uses the OData protocol for addressing and updating resources. In this way, you can access these services from any client that supports OData. OData enables you to request and write data to resources by using well-known transfer formats: Atom, a set of standards for exchanging and updating data as XML, and JavaScript Object Notation (JSON), a text-based data exchange format used extensively in AJAX application.
Q4. - (Topic 1)
You need to recommend a data access technology to the contractor to retrieve data from the new data source.
Which data access technology should you recommend?
A. LINQ to XML
B. ADO.NET Entity Framework
C. ADO.NET DataSets
D. WCF Data Services
Answer: D
Q5. 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:
Q6. - (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
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", "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:
Q8. DRAG DROP - (Topic 4)
You are developing a WCF service application.
The application must meet the following requirements:
Operations must have 30 second timeouts.
The service must have a transaction scope.
Transactions must flow from the client to the server.
You need to write a transactional service contract and implementation class to meet the requirements.
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:
Q9. DRAG DROP - (Topic 4)
You are creating a WCF service.
The service endpoints must be exposed to the Windows Azure Service Bus. The service bus has a namespace named RestaurantSB. The key provider is "owner".
You need to modify the web.config file to expose the endpoints.
How should you modify the file? (To answer, drag the appropriate attributes to the correct location or locations in the answer area. Each attribute 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