PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

Which tier should you recommend?

You are designing an n-tier .NET Framework 4 solution that includes a Windows
Presentation Foundation (WPF) application and a Windows Workflow Foundation (WF)
component. The WF component contains functionality to incorporate frequently changing
rules. You need to recommend a tier for the deployment of the WF component that will not
degrade the performance of the WPF application. Which tier should you recommend?

Which code segment should you insert at line 10?

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. You
use the ADO.NET Entity Framework to model entities. The application connects to a Microsoft SQL
Server database named AdventureWorks. The application includes the following code segment. (Line
numbers are included for reference only.)
01 Using context As New AdventureWorksEntities()
02 Dim orders As ObjectQuery(Of SalesOrderHeader) =
03 context.SalesOrderHeader.Where(“it.CreditCardApprovalCode IS NULL”).Top(“100”)
04 For Each order As SalesOrderHeader In orders
05 order.Status = 4
06 Next
07 Try
08 context.SaveChanges()
09 Catch generatedExceptionName As OptimisticConcurrencyException
10
11 End Try
12 End Using
You need to resolve any concurrency conflict that can occur. You also need to ensure that local
changes are persisted to the database. Which code segment should you insert at line 10?

You need to ensure that the correct authentication header is present when requests are made by using MyDataSer

You use Microsoft .NET Framework 4 to develop an application that uses WCF Data Services to
retrieve entities. WCF Data Services 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″
The application includes the following code. (Line numbers are included for reference only.)
01 Public Class Program
02
03 Public Sub GetProducts()
04
05 Dim proxy = New MyDataServiceContext()
06
07
08 End Sub
09
10 End Class
You need to ensure that the correct authentication header is present when requests are made by
using MyDataServiceContext. What should you do?

What should you recommend?

You are designing an ASP.NET Web application. Each page of the Web application will
have a common master page and derive from a common base page class. You have the
following requirements: Support multiple languages for user interface labels. Enable
automatic detection of language based on browser language settings. You need to
recommend an approach to support localization. What should you recommend?

Which code segment should you insert at line 09?

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. You
create a Database Access Layer (DAL) that is database-independent.
The DAL includes the following code segment. (Line numbers are included for reference only.)
01 Shared Sub ExecuteDbCommand(connection As DbConnection)
02 If connection <> Nothing Then
03 Using connection
04 Try
05 connection.Open()
06 Dim command As DbCommand = connection.CreateCommand()
07 command.CommandText = “INSERT INTO Categories (CategoryName) VALUES (‘Low Carb’)”
08 command.ExecuteNonQuery()
09
10 Catch ex As Exception
11 Trace.WriteLine(“Exception.Message: ” + ex.Message)
12 End Try
13 End Using
14 End If
15 End Sub
You need to log information about any error that occurs during data access. You also need to log the
data provider that accesses the database. Which code segment should you insert at line 09?