Which line of code should you insert at line 9?
You use Microsoft .NET Framework 4 to develop an application that connects to a Microsoft SQL
Server 2008 database. You add the following table to the database.
CREATE TABLE ObjectCache (
Id INT IDENTITY PRIMARY KEY,
SerializedObjectData XML )
You write the following code segment to retrieve records from the ObjectCache table. (Line numbers
are included for reference only.)
01Dim s As String = GetConnectStringFromConfigFile(“xmldb”)
02Using conn As New SqlConnection(s)
03Using cmd As New SqlCommand(
04″select * from ObjectCache”, conn))
05
06conn.Open()
07Dim rdr As SqlDataReader = cmd.ExecuteReader()
08While rdr.Read()
09
10DeserializeObject(obj)
11End While
12End Using
13End Using
You need to retrieve the data from the SerializedObjectData column and pass it to a method named
DeserializeObject. Which line of code should you insert at line 9?
What should you use in the Web Part?
You create a Web Part that updates a list. You need to ensure that users can use the Web Part to
update the list, regardless of the users’ permissions to the list. What should you use in the Web
Part?
Which event delivery optimization option should you enable?
You have a perimeter network that contains 20 servers. All of the servers run Windows Server 2008
R2 and are members of a workgroup. You add an additional server named Server21 to the perimeter
network. You plan to configure Server21 to collect events forwarded from the other servers. You
need to ensure that the events are available on Server21 as quickly as possible. Which event delivery
optimization option should you enable?
Which container should you recommend?
You are designing a Windows Presentation Foundation (WPF) application that displays
thumbnail images of photographs. The thumbnails are arranged in rows and columns. The
number of columns must automatically update based on the size of the application window.
You need to recommend a container for displaying all the thumbnail images at the same
size. Which container should you recommend?
Which approach should you recommend?
You are designing a SharePoint 2010 application. You need to design the application so
that it meets the following requirements: ·Content authors must be allowed to create product
pages. .Content authors also must be able to add Web Parts to customize the page.
.Product pages must allow the content author to select a value from a Product Type field as
defined in an existing site column. Which approach should you recommend?
Which code segment should you insert at line 05?
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. You write the following code segment. (Line
numbers are included for reference only.)
01public partial class SalesOrderDetail : EntityObject
02{
03partial void OnOrderQtyChanging(short value)
04{
05
06{
07…
08}
09}
10}
You need to find out whether the object has a valid ObjectStateEntry instance. Which code segment
should you insert at line 05?
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. The application uses the ADO.NET Entity
Framework to model entities. The database includes objects based on the exhibit. The application
includes the following code segment. (Line numbers are included for reference only.)
01 using (AdventureWorksEntities context = new AdventureWorksEntities()){
02
03 foreach (SalesOrderHeader order in customer.SalesOrderHeader){
04Console.WriteLine(String.Format(“Order: {0} “, order.SalesOrderNumber));
05 foreach (SalesOrderDetail item in order.SalesOrderDetail){
06Console.WriteLine(String.Format(“Quantity: {0} “, item.Quantity));
07Console.WriteLine(String.Format(“Product: {0} “, item.Product.Name));
08}
09}
10}
You want to list all the orders for a specified customer. You need to ensure that the list contains the
following fields:
“Order number
“Quantity of products
“Product name
Which code segment should you insert at line 02?
Which code segment should you insert at line 07?
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The
application connects to a Microsoft SQL Server 2008 database. The database includes a table named
dbo. Documents that contains a column with large binary data. You are creating the Data Access
Layer (DAL). You add the following code segment to query the dbo.Documents table. (Line numbers
are included for reference only.)
01 public void LoadDocuments(DbConnection cnx)
02 {
03 var cmd = cnx.CreateCommand();
04 cmd.CommandText = “SELECT * FROM dbo.Documents”;
05 …
06 cnx.Open();
07 …
08 ReadDocument(reader);
09 }
You need to ensure that data can be read as a stream. Which code segment should you insert at line
07?
What should you implement in WPMaster?
You are creating two Web Parts named WPMaster and WPDetails. You need to ensure that when
an item is selected from WPMaster, the details of the item are displayed in WPDetails. This must
occur without requiring WPDetails to retrieve the existing item from the data source. What should
you implement in WPMaster?
You need to ensure that entities changed in offline mode can be successfully updated in the data store
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 application allows users to
make changes while disconnected from the data store. Changes are submitted to the data store by
using the SubmitChanges method of the DataContext object. You receive an exception when you call
the SubmitChanges method to submit entities that a user has changed in offline mode. You need to
ensure that entities changed in offline mode can be successfully updated in the data store. What
should you do?