PrepAway - Latest Free Exam Questions & Answers

Category: 70-523

Exam 70-523: Upgrade: Transition your MCPD .NET Framework 3.5 Web Developer Skills to MCPD .NET Framework 4 Web Developer

Which code segment should you insert at line 02?

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?

What should you do?

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 application uses DataContexts to query the database. You create a function that meets the following requirements: “Updates the Customer table on the database when a customer is marked as deleted. “Updates the related entries in other tables (CustomerAddress, CustomerContacts) by marking them as deleted. “Prevents consumer code from setting the Deleted column’s value directly. You need to ensure that the function verifies that customers have no outstanding orders before they are marked as deleted. You also need to ensure that existing applications can use the update function without requiring changes in the code. What should you do?

Which code segment should you insert at line 04?

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 the following object query to load a product from the database. (Line numbers are included for reference only.)

01using (AdventureWorksEntities advWorksContext = new AdventureWorksEntities())
02{
03ObjectQuery <Product> productQuery = advWorksContext.Product.Where(“it.ProductID = 900”);
04
05}

You need to log the command that the query executes against the data source. Which code segment should you insert at line 04?

Which URL should you use for the query?

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create a Windows Communication Foundation (WCF) Data Services service. You deploy the service to the following URL: http://contoso.com/Northwind.svc. You want to query the WCF Data Services service to retrieve a list of customer objects. You need to ensure that the query meets the following requirements: “Only customers that match the following filter criteria are retrieved: City=”Seattle” AND Level > 200. “Data is sorted in ascending order by the ContactName and Address properties. Which URL should you use for the query?

Which two actions should you perform?

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create a Windows Communication Foundation (WCF) Data Services service. The service connects to a Microsoft SQL Server 2008 database. The service is hosted by an Internet Information Services (IIS) 6.0 server. You need to ensure that applications authenticate against user information stored in the database before the application is allowed to use the service. Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)

What should you do?

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. You use Microsoft ADO.NET Entity Data Model (EDM) to model entities. You create an entity named Person with a schema defined by the following XML fragment.

<EntityType Name=”CPerson”>
<Key>
<PropertyRef Name=”PersonId” />
</Key>
<Property Name=”PersonId” Type=”Int32″ Nullable=”false” />
<Property Name=”CompanyName” Type=”String” />
<Property Name=”ContactName” Type=”String” />
<Property Name=”ContactTitle” Type=”String” />
<Property Name=”Address” Type=”String” />
</EntityType>

You need to ensure that entities within the application are able to add properties related to the city, region, and country of Person’s address. What should you do?

What should you do?

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application.
The application contains the following code segment. (Line numbers are included for reference only.)
01 class DataAccessLayer
02 {
03 private static string connString;
04
05 …
06 public static DataTable GetDataTable(string command){
07
08 …
09 }
10 }
You need to define the connection life cycle of the DataAccessLayer class. You also need to ensure that the application uses the minimum number of connections to the database.
What should you do?


Page 13 of 14« First...1011121314