Microsoft UPG:Transition MCPD.NET Frmwrk 3.5 Web Dev to 4 Web Dev 70-523 Prüfungsfragen mit Lösungen:
1. You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The application uses the ADO.NET Entity Framework to model entities. The application allows users to make changes while disconnected from the data store. Changes are submitted to the data store by using the SubmitChanges method of the DataContext object. You receive an exception when you call the SubmitChanges method to submit entities that a user has changed in offline mode. You need to ensure that entities changed in offline mode can be successfully updated in the data store. What should you do?
A) Set the ObjectTrackingEnabled property of DataContext to true.
B) Call the SubmitChanges method of DataContext with a value of System.Data.Linq.ConflictMode. ContinueOnConflict.
C) Set the DeferredLoadingEnabled property of DataContext to true.
D) Call the SaveChanges method of DataContext with a value of false.
2. You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The application connects to a Microsoft SQL Server 2008 database. The database includes a table named dbo. Documents that contains a column with large binary dat a. You are creating the Data Access Layer (DAL). You add the following code segment to query the dbo.Documents table. (Line numbers are included for reference only.)
01public void LoadDocuments(DbConnection cnx)
02{
03var cmd = cnx.CreateCommand();
04cmd.CommandText = "SELECT * FROM dbo.Documents";
05...
06cnx.Open();
08ReadDocument(reader); }
You need to ensure that data can be read as a stream. Which code segment should you insert at line 07?
A) var reader = cmd.ExecuteReader(CommandBehavior.Default);
B) var reader = cmd.ExecuteReader(CommandBehavior.SchemaOnly);
C) var reader = cmd.ExecuteReader(CommandBehavior.KeyInfo);
D) var reader = cmd.ExecuteReader(CommandBehavior.SequentialAccess);
3. You use Microsoft Visual Studio 2010, Microsoft Sync Framework, and Microsoft .NET Framework 4 to
create an application. You have a ServerSyncProvider connected to a Microsoft SQL Server database. The
database is hosted on a Web server. Users will use the Internet to access the Customer database through
the ServerSyncProvider. You write the following code segment. (Line numbers are included for reference
only.)
01SyncTable customerSyncTable = new SyncTable("Customer");
02customerSyncTable.CreationOption = TableCreationOption. UploadExistingOrCreateNewTable;
03
04customerSyncTable.SyncGroup = customerSyncGroup;
05 this.Configuration.SyncTables.Add(customerSyncTable);
You need to ensure that the application meets the following requirements: "Users can modify data locally
and receive changes from the server. "Only changed rows are transferred during synchronization. Which
code segment should you insert at line 03?
A) customerSyncTable.SyncDirection = SyncDirection.Snapshot;
B) customerSyncTable.SyncDirection = SyncDirection.Bidirectional;
C) customerSyncTable.SyncDirection = SyncDirection.UploadOnly;
D) customerSyncTable.SyncDirection = SyncDirection.DownloadOnly;
4. You are creating a Windows Communication Foundation (WCF) service that accepts messages from
clients when they are started.
The message is defined as follows.
[MessageContract] public class Agent {
public string CodeName { get; set; }
http://www.test4pass.com Leading the way in IT Certification Exams
public string SecretHandshake { get; set; }
}
You have the following requirements:
"The CodeName property must be sent in clear text.
The service must be able to verify that the property value was not changed after being sent by the client.
"The SecretHandshake property must not be sent in clear text and must be readable by the service. What should you do?
A) Add a MessageBodyMember attribute to the CodeName property and set the ProtectionLevel to Sign. Add a MessageBodyMember attribute to the SecretHandshake property and set the ProtectionLevel to EncryptAndSign.
B) Add an XmlText attribute to the CodeName property and set the DataType property to Signed. Add a PasswordPropertyText attribute to the SecretHandshake property and set its value to true.
C) Add an ImmutableObject attribute to the CodeName property and set its value property to true. Add a Browsable attribute to the SecretHandshake property and set its value to false.
D) Add a DataProtectionPermission attribute to the each property and set the ProtectData property to true.
5. You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The
application connects to a Microsoft SQL Server database.
You create the classes shown in the following exhibit.
You add the following code segment to the application. (Line numbers are included for reference only.)
01 public void QueryPlayers(List <League> leagues) {
02
03 }
You create a LINQ query to retrieve a collection of Player objects.
You need to ensure that the collection includes all the players from each team and every league.
Which code segment should you insert at line 02?
A) var query = leagues.Select(l => l.Teams.Select(t => t.Players));
B) var query = leagues.SelectMany(l => l.Teams.SelectMany(t => t.Players));
C) var query = leagues.Select(l => l.Teams.SelectMany(t => t.Players));
D) var query = leagues.SelectMany(l => l.Teams.Select(t => t.Players));
Fragen und Antworten:
| 1. Frage Antwort: A | 2. Frage Antwort: D | 3. Frage Antwort: B | 4. Frage Antwort: A | 5. Frage Antwort: B |






768 Kundenbewertungen

