PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

What should you do?

You are developing a Windows Communication Foundation (WCF) service that allows customers to update financial data.
The service contract is defined as follows. (Line numbers are included for reference only)

01 [ServiceContract]
02 public interface IDataUpdate
03 {
04 [OperationContract]
05 [TransactionFlow(TransactionFlowOption.Mandatory)]
06 void Update(string accountNumber, double amount);
07 }
08
09 class UpdateService : IDataUpdate
10 {
11 [OperationBehavior(TransactionScopeRequired = true, TransactionAutoComplete = false)]
12 public void Update(string accountNumber, double amount)
13 {
14 …
15 }
16 }
17

You need to ensure that the service is invoked within the transaction. What should you do?

Which ObjectContext method should you call?

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application.
You use the ADO.NET Entity Framework to model your entities.
You use Plain Old CLR Objects (POCO) entities along with snapshot-based change tracking. The code accesses the POCO entities directly.
You need to ensure that the state manager synchronizes when changes are made to the object graph.
Which ObjectContext method should you call?

Which technology should you use?

You are designing an application by using Microsoft NET Framework 4 and Microsoft Visual Studio 2010.
Your development team consists of designers and C# developers. You need to ensure that the application meets the following requirements:
+ Kit allows separation of user interface (UI) code and business logic.
+ tt allows the UI to be data-bound without requiring a code-behind file.

Which technology should you use?

What should you do?

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application.
The application connects to a Microsoft SQL Server database.
The application uses the ADO.NET LINQ to SQL model to retrieve data from the database.
The application will not modify retrieved data. You need to ensure that all the requested data is retrieved.
You want to achieve this goal using the minimum amount of resources. What should you do?

What do you do?

You create a Windows Communication Foundation (WCF) service and deploy it with wsHttpBinding and message security enabled.
You create an intermediate WCF service for logging messages sent to the primary service.
The intermediate service is called via endpoint behaviour. The primary service is receiving malformed data from a client application.
You need to enable inspection of the malformed data and prevent message tampering. What do you do?