Which expression should you use?
###BeginCaseStudy###
Case Study: 1
Background
You are updating an existing Microsoft .NET Framework 4 application that includes a data
layer built with ADO.NET Entity Framework 4. The application communicates with a
Microsoft SQL Server 2008 instance named INST01 on a server named SQL01. The
application stores data in a database named Contoso in the INST01 instance.
You need to update the existing technology and develop new functionality by using
Microsoft Visual Studio 2010.
Application and Database Storage
The application tracks bicycle parts as they pass through a factory. Parts are represented by
the abstract Part entity and its associated partial classes. Each part has a name stored in the
Name field and a unique identifier stored in the Id field.
Parts are either component s (represented by the Component class) such as chains, wheels,
and frames, or finished product s (represented by the Product class) such as completed
bicycles. The Component class and the Product class derive from the Part class and may
contain additional class-specific properties.
Parts may have a color (represented by the Color class), but not all parts have a color, Parts
may be composed of other parts, and those parts may in turn be composed of other parts ; any
p art represents a tree of the parts that are used to build it, The lowest level of the tree consists
of c omponents that do not contain other component s.
A p roduct is a p art that has been completed and is ready to leave the factory. A p roduct
typically consists of many c omponents (forming a tree of child p arts) but can also be
constructed by combining other p roducts and/or c omponents to form a bundled p roduct,
such as a bicycle and a helmet that are sold together.
C omponents and p roducts are stored in a database table named Parts by using a table-perhierarchy (TPH) mapping. Components have a null ProductType field and a non-null
PartType field. Products have a non-null ProductType field and a null PartType field.
The following diagram illustrates the complete Entity data model diagram (EDMX diagram),
The following graphic illustrates detail s of the Part-Color Association.
The following code segments show relevant portions of the files referenced by the case study
items. (Line numbers in the samples below are included for reference only and include a twocharacter prefix that denotes the specific file to which they belong.)
Extension Methods.vb
Model.edmx
Model/Color.vb
Model/Component.vb
ModelContosoEntities.vb
Model IName.vb
Model Part.vb
Model Product.vb
sp_FindObsolete
###EndCaseStudy###
The application must provide a component part list for any product. The component part list must
give the quantity of each distinct part that is required to manufacture that product. You need to
create a LINQ expression that delivers a result of type IEnumerable(Of Tuple(Of Integer, Part))to
meet the requirements. Which expression should you use?
Which of the following queries should you use?
###BeginCaseStudy###
Case Study: 1
Background
You are updating an existing Microsoft .NET Framework 4 application that includes a data
layer built with ADO.NET Entity Framework 4. The application communicates with a
Microsoft SQL Server 2008 instance named INST01 on a server named SQL01. The
application stores data in a database named Contoso in the INST01 instance.
You need to update the existing technology and develop new functionality by using
Microsoft Visual Studio 2010.
Application and Database Storage
The application tracks bicycle parts as they pass through a factory. Parts are represented by
the abstract Part entity and its associated partial classes. Each part has a name stored in the
Name field and a unique identifier stored in the Id field.
Parts are either component s (represented by the Component class) such as chains, wheels,
and frames, or finished product s (represented by the Product class) such as completed
bicycles. The Component class and the Product class derive from the Part class and may
contain additional class-specific properties.
Parts may have a color (represented by the Color class), but not all parts have a color, Parts
may be composed of other parts, and those parts may in turn be composed of other parts ; any
p art represents a tree of the parts that are used to build it, The lowest level of the tree consists
of c omponents that do not contain other component s.
A p roduct is a p art that has been completed and is ready to leave the factory. A p roduct
typically consists of many c omponents (forming a tree of child p arts) but can also be
constructed by combining other p roducts and/or c omponents to form a bundled p roduct,
such as a bicycle and a helmet that are sold together.
C omponents and p roducts are stored in a database table named Parts by using a table-perhierarchy (TPH) mapping. Components have a null ProductType field and a non-null
PartType field. Products have a non-null ProductType field and a null PartType field.
The following diagram illustrates the complete Entity data model diagram (EDMX diagram),
The following graphic illustrates detail s of the Part-Color Association.
The following code segments show relevant portions of the files referenced by the case study
items. (Line numbers in the samples below are included for reference only and include a twocharacter prefix that denotes the specific file to which they belong.)
Extension Methods.vb
Model.edmx
Model/Color.vb
Model/Component.vb
ModelContosoEntities.vb
Model IName.vb
Model Part.vb
Model Product.vb
sp_FindObsolete
###EndCaseStudy###
You need to write a LINQ query that can be used against a ContosoEntities context object named
context to find all parts that have a duplicate name. Which of the following queries should you use?
(Each correct answer presents a complete solution. Choose two.)
Which authentication method should you recommend?
You are designing a SharePoint 2010 application. You have the following requirements:
·Display sales data from a CRM system. .Authenticate users to the CRM system through
their Windows credentials. .Eliminate multiple authentication requests. You need to choose
an authentication method that supports the requirements. Which authentication method
should you recommend?
You need to ensure that a demand-dial connection starts when users attempt to connect to resources in the new
Your network contains two offices named Office1 and Office2. The offices connect to each other by
using a demand-dial connection. You add a new subnet in Office2. You need to ensure that a
demand-dial connection starts when users attempt to connect to resources in the new Office2
subnet. What should you do from the Remote Routing and Access console?
You need to recommend an approach for modifying the Money class to meet the requirements
An ASP.NET Web application contains a class named Money. The Money class has
properties named Value and Currency. The Locals window of the Microsoft Visual Studio
2010 IDE currently displays the Value and Currency properties only when the Money object
is expanded. You have the following requirements: • Display the Value and Currency
property values in the Locals windows. • Display the property values without requiring the
developer to expand the Money object. You need to recommend an approach for modifying
the Money class to meet the requirements. What should you do?
Which code segment should you include in the Feature?
You are creating a custom content type named CT1. You need to use a Feature to add an existing
site column named SiteCol1 to CT1. Which code segment should you include in the Feature?
Which testing strategy should you recommend?
You are designing a Windows Presentation Foundation (WPF) application by using
Microsoft .NET Framework 4 and Microsoft Visual Studio 2010. During testing of the
application, you identify several bottlenecks by using Windows Task Manager and Windows
Performance Monitor. You need to recommend a system test strategy that will meet the
following requirements: • Identify major application workloads. • Identify the functions of the
application that are most impacted. Which testing strategy should you recommend?
Which code segment should you add at line 05?
You create a Web Part. You need to display the number of visits to a SharePoint site collection in
a label named LblVisits. You write the following code segment. (Line numbers are included for
reference only.) 01 SPSecurity.RuntfithElevatedPrivileges (delegate() 02 { 03 try 04 { 05 06
LblVisits.Text = site.Usage.Visits.ToString () ; 07 } 08 finally 09 { 10 11 } 12 } 13 ); Which code
segment should you add at line 05?
You need to ensure that the secure Web site can be accessed from the Internet
Your network contains a server named Server1 that has the Routing role service installed. Server1
has two network connections. One network connection connects to the internal network. The other
network connection connects to the Internet. All network connections connected to the internal
network use private IP addresses. You install a Web server named Web1. Web1 hosts a secured Web
site that only allows connections over TCP port 8281. Web1 is connected to the internal network.
You need to ensure that the secure Web site can be accessed from the Internet. What should you do
from the Routing and Remote Access console?
What should you do?
You are designing a Windows Presentation Foundation (WPF) application by using
Microsoft .NET Framework 4 and Microsoft Visual Studio 2010. The application will consist
of a user interface (UI) tier and a middle tier. The middle tier will be implemented by using
Windows Communication Foundation (WCF). You plan to design the exception handling
strategy for the application. Each method in the middle tier will contain the following catch
block. Catch e As ArgumentNullException Throw e When testing the application, you
discover that all ArgumentNullExceptions that occur in the middle tier do not contain
accurate stack trace information. What should you do?