PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

Which code segment should you insert at line 06?

You use Microsoft .NET Framework 4 to develop an application that uses WCF Data Services to
persist entities from the following Entity Data Model.

You create a new Blog instance named newBlog and a new Post instance named newPost as shown
in the following code segment. (Line numbers are included for reference only.)
01 Blog newBlog = neu Blog();
02 Post neuPost = neu Post ();
03 –
04 Uci serviceUri = new Uri (“… “);
05 BlogsEntities context = new BlogsEntities(serviceUri);
06
You need to ensure that newPost is related to newBlog through the Posts collection property and
that newPost and newBlog are sent to the service. Which code segment should you insert at line 06?

Which code segment should you use?

You use Microsoft .NET Framework 4 to develop an application that connects to a Microsoft SQL
Server 2008 database. The application includes a table adapter named taStore, which has the
following DataTable.

There is a row in the database that has a ProductID of 680. You need to change the Name column in
the row to “New Product Name”. Which code segment should you use?

You need to ensure that the new feature meets the following requirements: • It provides a three-dimensional

You are designing a new feature for an existing Windows Forms application by using
Microsoft .NET Framework 4. The application contains multiple forms that are loaded into a
parent Multiple Document Interface (MDI) form. Your company policy does not allow the use
of third-party controls. You need to ensure that the new feature meets the following
requirements: • It provides a three-dimensional scale model. • It allows users to change the
colors of the model and communicates the color selections back to the application. • It
allows the model to scale, based on the user’s client computer display resolution. • It is a
child form in the MDI application. What should you do?

You need to design the application to meet the requirements

You are designing an ASP.NET Web application. You have the following requirements: The
application must be usable in partially connected scenarios. Data that is entered into the
application offline must be synchronized with the server the next time the application is
online. You need to design the application to meet the requirements. What should you use?

Which code segment should you add at line 03?

You need to create a Web Part that adds a term set to the current SharePoint site collection’s
term store. You write the following code segment. (Line numbers are included for reference only.)
01 TaxonomySession session = new TaxonomySession ( SPContext.Current..Site ) ; 02 TermSet
addedTerm = session.TermStores [O] .Groups [” MyNewTermStore “] . CreateTermSet (
txtBoxTermSetToAdd.Text ) ; 03 Which code segment should you add at line 03?

You need to ensure that all transactions can be recovered

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The
application connects to several SQL Server databases. You create a function that modifies customer
records that are stored in multiple databases. All updates for a given record are performed in a
single transaction. You need to ensure that all transactions can be recovered. What should you do?

Which line of code should you use?

You use Microsoft .NET Framework 4 to develop an application that exposes a WCF Data Services
endpoint. The endpoint uses an authentication scheme that requires an HTTP request that has the
following header format.
GET /OData.svc/Products(1)
Authorization: WRAP access_token “123456789”
You add the following method to your DataService implementation.
protected override void OnStartProcessingRequest
(ProcessRequestArgs args)
{
• • •
}
You need to ensure that the method retrieves the authentication token. Which line of code should
you use?

Which two actions should you recommend?

You are designing a .NET Framework 4 solution. The solution contains a Windows
Presentation Foundation (WPF) application and a Windows Communication Foundation
(WCF) Web service. The WPF application uses the WCF Web service to store data in a
Microsoft SQL Server 2008 database. You have the following requirements: Ensure that the
WPF application functions while users’computers are offline. Minimize the time spent
sending data to the WCF Web service. Minimize disk space requirements for data storage.
You need to recommend an approach for synchronizing data between the WPF application
and the database. Which two actions should you recommend? (Each correct answer
presents part of the solution. Choose two.)

Which code segment should you use in the Initialize method?

You are developing a WCF data service that will expose an existing Entity Data Model (EDM). You
have the following requirements:
• Users must be able to read all entities that are exposed in the EDM.
• Users must be able to update or replace the SalesOrderHeader entities.
• Users must be prevented from inserting or deleting the SalesOrderHeader entities
You need to ensure that the data service meets the requirements.
Which code segment should you use in the Initialize method?