PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

What are two possible code segments that you can use to achieve this goal?

You use Microsoft .NET Framework 4 to develop an application that connects to a Microsoft SQL
Server 2008 database. You add the following stored procedure to the database.
CREATE PROCEDURE GetProducts
AS
BEGIN
SELECT ProductID, Name, Price, Cost
FROM Product
END
You create a SqlDataAdapter named adapter to execute the stored procedure. You need to fill a
DataTable instance with the first 10 rows of the result set. What are two possible code segments
that you can use to achieve this goal? (Each correct answer presents a complete solution. Choose
two.)

You need to design a cache solution for the SaaS application

You create a software-as-a-service (SaaS) application. Websites, cloud services, and virtual machines (VMs)
read common data values from the database for the application.
The application does not scale efficiently. All VMs, websites, and cloud services must read from the same data
source.
You need to design a cache solution for the SaaS application.
What should you do?

You need to ensure that the Product data for each Category object is lazy-loaded

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 add the following code segment. (Line
numbers are included for reference only.)
01 var uri = new Uri(@”http://contoso.com/Northwind.svc/”);
02 var ctx = new NorthwindEntities(uri);
03 var categories = from c in ctx.Categories
04 select c;
05 foreach (var category in categories) {
06 PrintCategory(category);
07
08 foreach (var product in category.Products) {
09
10 PrintProduct(product);
11 }
12 }
You need to ensure that the Product data for each Category object is lazy-loaded. What should you
do?

Which testing strategy should you recommend?

You are designing a Windows Presentation Foundation (WPF) application by using
Microsoft .NET Framework 4 and Microsoft Visual Studio 2010. You need to ensure that the
following requirements are met: All UI elements are labeled. All property values are
exposed. Keyboard navigation contains tab stops for all controls. The application functions
on high contrast displays. Which testing strategy should you recommend?

Which code segment should you insert at line 02?

You are modifying a web application so that it uses Azure Active Directory to manage users. You create a
security group named Users and a security group named Administrators. The Administrators security group is a
member of the Users security group.
You create the following code segment. Line numbers are included for reference only.

You need to implement the canAccessUserResources function.
Which code segment should you insert at line 02?

Which approach should you recommend?

You are designing a SharePoint 2010 application that includes a Task list. You have the
following requirements: ·For each task, allow users to specify one of three values for an
item named Phase using a drop-down menu. .Allow contributors to add new values for the
Phase item. You need to design this application without using custom code. Which
approach should you recommend?

Which code segment should you insert at line 14?

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 conceptual schema definition
language (CSDL) file contains the following XML fragment.
< EntityType Name=”Contact”>

<Property Name=”EmailPhoneComplexProperty”
Type=”AdventureWorksModel.EmailPhone”
Nullable=”false” />
</EntityType>

<ComplexType Name=”EmailPhone”>
<Property Type=”String” Name=”EmailAddress”
MaxLength=”50″ FixedLength=”false”
Unicode=”true” />
<Property Type=”String” Name=”Phone” MaxLength=”25″
FixedLength=”false” Unicode=”true” />
</ComplexType>
You write the following code segment. (Line numbers are included for reference only.)
01 using (EntityConnection conn = new EntityConnection(“name=AdvWksEntities”))
02 {
03 conn.Open();
04 string esqlQuery = @”SELECT VALUE contacts FROM
05 AdvWksEntities.Contacts AS contacts
06 WHERE contacts.ContactID == 3″;
07 using (EntityCommand cmd = conn.CreateCommand())
08 {
09 cmd.CommandText = esqlQuery;
10 using (EntityDataReader rdr = cmd.ExecuteReader())
11 {
12 while (rdr.Read())
13 {
14
15 }
16 }
17 }
18 conn.Close();
19 }
You need to ensure that the code returns a reference to a ComplexType entity in the model named
EmailPhone. Which code segment should you insert at line 14?

You need to ensure that the WeatherDetails application displays the weather details for the city that the user

You are developing a messaging solution to integrate two applications named WeatherSummary and
WeatherDetails. The WeatherSummary application displays a summary of weather information for major
cities. The WeatherDetails application displays weather details for a specific city.
You need to ensure that the WeatherDetails application displays the weather details for the city that the user
selects in the WeatherSummary application.
What should you do?