PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

Which code segment should you insert at line 05?

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to develop an application
that uses the Entity Framework. You create the following Entity Data Model.

You write the following code. (Line numbers are included for reference only.)
01 Using context As New Model1Container()
02 Dim cust As Customer = context.Customers.First()
03 cust.CompanyName = “Contoso”
04 Dim count As Integer = 0
05
06 End Using
The changes to the cust entity must be saved. If an exception is thrown, the application must retry
the save 3 times. You need to add a code segment to meet the requirements. Which code segment
should you insert at line 05?

Which approach should you recommend?

You are using SharePoint 2010 to develop multiple Internet sites. You have the following
requirements: ·Create a user registration page for each site. .Use the logic found in a
custom control named UserRegistration.ascx. You need to provide a solution that will allow
each site to have a custom user registration page with HTML editing capability. Which
approach should you recommend?

You need to ensure that updates for the new application are available to all of the client computers

Your network contains a Windows Server Update Services (WSUS) server named Server1. All client
computers are configured to download updates from Server1. Server1 is configured only to
synchronize manually to Microsoft Update. Your company deploys a new Microsoft application. You
discover that the new application is not listed on the Products and Classifications list. You need to
ensure that updates for the new application are available to all of the client computers. What should
you do first?

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.)
01Public Sub QueryPlayers(leagues As List(Of League))
02
03End Sub
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 recommend?

You are working with an existing Windows Presentation Foundation (WPF) application in
Microsoft Visual Studio 2010. The WPF application requires approximately one minute to
initialize before displaying its main window. You have the following requirements:
Immediately display a splash screen when the WPF application launches. Allow for the
display of an initialization progress bar on the splash screen. Close the splash screen when
the WPF application is ready to display the main window. You need to recommend an
approach for meeting the requirements. What should you recommend?

You need to convert the user control to a Web Part that will be hosted in a Microsoft SharePoint Server 2010 f

You are running a default installation of Microsoft Visual Studio 2010. You have a user control
named Control.ascx. You need to convert the user control to a Web Part that will be hosted in a
Microsoft SharePoint Server 2010 farm. The Web Part must be packaged as a sandboxed
solution. What should you do?

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 contains the following XML document.
< feed >
< title > Products < /title >
< entry >
< title > Entry title 1 < /title >
< author > Author1 < /title >
< content >
< properties >
< description > some description < /description >
< n otes > some notes < /notes >
< comments > some comments < /comments >
< /properties >
< /content >
< /entry >

< /feed >
You plan to add localization features to the application.
You add the following code segment. (Line numbers are included for reference only.)
01Public Function GetTextNodesForLocalization(doc As XDocument) As IEnumerable(Of XNode)

02
03Return From n In nodes _
04Where n.NodeType = XmlNodeType.Text _
05 Select n
06End Function
You need to ensure that the GetTextNodesForLocalization method returns all the XML text nodes of
the document. Which code segment should you insert at line 02?

Which code segment should you use?

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to develop an application
that uses the Entity Framework. The application has an entity model that includes SalesTerritory and
SalesPerson entities as shown in the following diagram.

You need to calculate the total bonus for all sales people in each sales territory. Which code segment
should you use?

What should you recommend?

You are designing a Windows Presentation Foundation (WPF) application. Business entity
objects are bound to controls on each data entry window. The WPF application must meet
the following requirements: Display a watermark in each empty text box. Display
watermarks in a lighter color than user entries. The watermark code must be reusable with
other user interface controls. You need to recommend an approach for creating the
watermarks. What should you recommend?