QUESTION NO: 1
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.) MCITP Certification
01public void QueryPlayers (Listleagues)
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.Select (l => l.Teams.SelectMany (t => t.Players ));
C. var query = leagues.SelectMany (l => l.Teams.SelectMany (t => t.Players ));
D. var query = leagues.SelectMany (l => l.Teams.Select (t => t.Players ));
Answer: C
Explanation:
QUESTION NO: 2
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create a Windows Communication Foundation (WCF) Data Services service. You deploy the data service to the following URL: http://contoso.com/Northwind.svc. You need to update the City property of the Customer record that has its ID value as 123. You also need to preserve the current values of the remaining properties. Which HTTP request should you use?
169
A. PUT /Northwind.svc/Customers(123)
Host: contoso.com
Content-Type: application/json
City: 'Seattle'
B. PUT /Northwind.svc/Customers(123)
Host: contoso.com
Accept: application/json
City: 'Seattle'
C. MERGE /Northwind.svc/Customers(123)
Host: contoso.com
Content-Type: application/json
City: 'Seattle'
D. MERGE /Northwind.svc/Customers(123)
Host: contoso.com
Accept: application/json
City: 'Seattle'
Answer: C
Explanation:
QUESTION NO: 3
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The application connects to a Microsoft SQL Server database. The application uses a DataTable named OrderDetailTable that has the following columns:
ID
OrderID
ProductID
Quantity LineTotal
Some records contain a null value in the LineTotal field and 0 in the Quantity field.
170
You write the following code segment. (Line numbers are included for reference only.) 01DataColumn column = new DataColumn("UnitPrice", typeof(double));
02
03OrderDetailTable.Columns.Add(column);
You need to add a calculated DataColumn named UnitPrice to the OrderDetailTable object. You also need to ensure that UnitPrice is set to 0 when it cannot be calculated.
Which code segment should you insert at line 02?
A. column.Expression = "LineTotal/Quantity";
B. column.Expression = "LineTotal/ISNULL(Quantity, 1)";
C. column.Expression = "if(Quantity > 0, LineTotal/Quantity, 0)";
D. column.Expression = "iif(Quantity > 0, LineTotal/Quantity, 0)";
Answer: D
Explanation: