PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

What should you recommend?

You are designing a Windows Presentation Foundation (WPF) application that accesses a
business tier. The business tier is implemented as a Windows Communication Foundation
(WCF) service and stores data in a Microsoft SQL Server 2008 database. The WCF service
will be accessed by external applications that do not use the .NET Framework. You need to
recommend an approach for passing data between layers. What should you recommend?

Which code segment should you insert at line 06?

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 has two DataTable objects
that reference the Customers and Orders tables in the database. The application contains the
following code segment. (Line numbers are included for reference only.)
01 Dim customerOrders As New DataSet()
02 customerOrders.EnforceConstraints = True
03 Dim ordersFK As New ForeignKeyConstraint(“ordersFK”,
04 customerOrders.Tables(“Customers”).Columns(“CustomerID”),
05 customerOrders.Tables(“Orders”).Columns(“CustomerID”))
06
07 customerOrders.Tables(“Orders”).Constraints.Add(ordersFK)
You need to ensure that an exception is thrown when you attempt to delete Customer records that
have related Order records. Which code segment should you insert at line 06?

Which code segment should you insert at line 05?

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The
application connects to a Microsoft SQL Server database and contains a LINQ to SQL data model. The
data model contains a function named createCustomer that calls a stored procedure. The stored
procedure is also named createCustomer. The createCustomer function has the following signature.
Sub New(customerID As Guid, customerName As [String], address1 As [String])
End Sub
The application contains the following the following code segment. (Line numbers are included for
reference only.)
01 Dim context As New CustomDataContext()
02 Dim userID As Guid = Guid.NewGuid()
03 Dim address1 As [String] = “1 Main Street”
04 Dim name As [String] = “Marc”
05
You need to use the createCustomer stored procedure to add a customer to the database. Which
code segment should you insert at line 05?

Which two approaches could you recommend?

You are designing an ASP.NET Web application by using Microsoft Visual Studio 2010. The
Web application uses dynamic HTML (DHTML). You need to ensure that the application
functions properly on multiple browser platforms without requiring the installation of a
client-side component. Which two approaches could you recommend? (Each correct
answer presents a complete solution. Choose two.)