Which code segment should you insert at line 03?
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. You
are creating the data layer of the application. You write the following code segment. (Line numbers
are included for reference only.)
01 public static SqlDataReader GetDataReader(string sql) {
02 SqlDataReader dr – null;
03
03 return dr;
05 }
You need to ensure that the following requirements are met:
• The SqlDataReader returned by the GetDataReader method can be used to retrieve rows
from the database.
• SQL connections opened within the GetDataReader method will close when the
SqlDataReader is closed.
Which code segment should you insert at line 03?
You need to ensure that the cached data expires when the customer data is updated
You are developing an application by using Microsoft .NET Framework 4 and Microsoft
Visual Studio 2010. The application contains a grid that displays customer data stored in a
database table. Users report that the grid takes a long time to display. You plan to
implement data caching to improve loading time for the grid. You need to ensure that the
cached data expires when the customer data is updated. What should you do?
Which code segment should you use?
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to develop an application. A
file named books.xmi contains ths following XML.
<bib>
<book title3″Ercgranraing in Unix” yeai=”1992*,>
<author> Author1</author >
<author>Author2</author>
<author>Author3</author>
</book>
</bib>
The application must generate an XML result that contains an XML element named DookTitle for
each book. The text content of must contain the title of the book. You need to create a query that
generates the new XML result. Which code segment should you use?
Which code segment should you add at line 19?
You create a Web Part that queries a list. The Web Part contains the following code segment.
(Line numbers are included for reference only.) 01 protected override void Render(
HtmlTextWriter writer) 02 { 03 SPUserToken spInToken = GetTheContext (
SPContext.Current.Site ) ; 04 using (SPSite aSite = nera SPSite ( curSiteCtx.ID , spInToken ) ) 05
{ 06 07 } 08 } 09 private SPUserToken GetTheContext ( SPSite nUeb ) 10 < 11
nWeb.CatchAccessDeniedException = false; 12 SPUserToken spToken = null; 13 try 14 { 15
spToken = nWeb.SystemAccount.UserToken ; 16 } 17 catch ( UnauthorizedAccessException ) 18
{ 19 20 } 21 return spToken; 22 } You need to ensure that users without permissions to the list can
view the contents of the list from the Web Part. Which code segment should you add at line 19?
You need to ensure that the health certificates are only valid for four hours
Your network contains an Active Directory domain. The domain contains an enterprise certification
authority (CA) named Server1 and a server named Server2. On Server2, you deploy Network Policy
Server (NPS) and you configure a Network Access Protection (NAP) enforcement policy for IPSec.
From the Health Registration Authority snap-in on Server2, you set the lifetime of health certificates
to four hours. You discover that the validity period of the health certificates issued to client
computers is one year. You need to ensure that the health certificates are only valid for four hours.
What should you do?
which two procedures should you add the Qproductld parameter?
CD -C# 1st
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. You
create stored procedures by using the following signatures:
• CREATE procedure [dbo].[Product Insert](Gname varchar(50),8price float)
• CREATE procedure [dbo].[Product_Updatej (@id int, Bname varchar(50), @price
float)
• CREATE procedure [dbo].[Product_Delete] (@ Id int)
• CREATE procedure [dbo].[Order_Insert] (@productld Int, Gquantity Int)
• CREATE procedure [dbo].[Order_Update](@id int, Gquantity int,GoriginalTimestamp
tlmestamp)
• CREATE procedure [dbo].[Order_Delete](@id int)
You create a Microsoft ADO.NET Entity Data Model (EDM) by using the Product and Order entities as
shown in the exhibit. (Click the Exhibit button.)
You need to map the Product and Order entities to the stored procedures. To which two procedures
should you add the Qproductld parameter? (Each correct answer presents part of the solution.
Choose two.)
Which approach should you recommend?
You manage your company’s SharePoint 2010 development efforts. Your company has
hired an outside vendor to print its marketing materials. The head of the marketing
department has asked you to design a plan to add functionality to the intranet site that will
allow company employees to submit their print orders to a SharePoint list on the intranet
site throughout the day. The vendor should receive a daily e-mail that shows them all the
orders that were submitted to the intranet site the day before. Your plan needs to make this
functionality possible. Which approach should you recommend?
You need to ensure that entities within the application are able to add properties related to the city, region
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. You
use Microsoft ADO.NET Entity Data Model (EDM) to mode entities. You create an entity named
Person with a schema defined by the following XML fragment
<EnlityType l1ame’CPerson”
<Key>
<PropertyRef Name=”Personld” I>
</Key>
<Property Name=”Personid” Typel=”int32” Nullable=”false” />
<Property Name=”CompaiyName” Type=”String”/>
<Property Name=”ContactName” Type”Strng”/>
<Property Name=”ContactTitle” Type=’String”/>
<Proper1y Name=”Address” Type=”String”/>
</Entitytype>
You need to ensure that entities within the application are able to add properties related to the city,
region, and country of Person’s address. What should you do?
What should you recommend?
You are designing a Windows Presentation Foundation (WPF) application. The WPF
application displays indicators to compare your company’s past performance to the current
day’s operations data. The WPF application accesses historic data from your company’s
data warehouse through a Web service, and accesses current data directly from a Microsoft
SQL Server 2008 database. The WPF application must meet the following requirements:
Retrieve historic data from the data warehouse at application startup and then once per day.
Retrieve current data from the database every five minutes, and then update the indicators.
Cache all retrieved data. Target the .NET Framework 4 Client Profile. You need to
recommend an approach to data caching. What should you recommend?
Which layer should you recommend?
You are designing a testing methodology for an ASP.NET MVC 2 Web application. The
application has a rich domain model that represents the logic and the data of the business.
A facade over the domain model provides a simplified API that is used by the controllers. A
data access layer beneath the domain model is used by the domain model to handle data
storage and retrieval. You have the following requirements: Centralize business rules.
Directly validate the accuracy of the business rules. You need to design tests against the
appropriate layer to meet the requirements. Which layer should you recommend?