You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The
application connects to a Microsoft SQL Sever 2008 database. The database includes a table that
contains information about all the employees. The database table has a field named EmployeeType
that identifies whether an employee is a Contractor or a Permanent employee. You declare the
employee entity base type. Yo create a new Association entity named Contractor that inherits the
Employee base type. You need to ensure that all Contractors are bound to the Contractor class.
What should you do?
A.
Modify the .edmx file to include the following line of code.
<NavigationProperty Name=’Type’ FromRole=”EmployeeType’ ToRole”Contractor”/>
B.
Modify the .edmx file to include the following Iine of code.
<Condition ColumnName=”EmployeeType” Value=”Contractor”/>
C.
Use the Entity Data Model Designer to set up an association between the Contractor class and
EmployeeType
D.
Use the Entity Data Model Designer to set up a referential constraint between the primary key of
the Contractor class and ErnployeeType
Explanation:
<Association Name=”FK_OrderDetails_Orders1″>
<End Role=”Orders” Type=”StoreDB.Store.Orders” Multiplicity=”1″>
<OnDelete Action=”Cascade” />
</End>
<End Role=”OrderDetails” Type=”StoreDB.Store.OrderDetails” Multiplicity=”*” />
<ReferentialConstraint>
<Principal Role=”Orders”>
<PropertyRef Name=”ID” />
</Principal>
<Dependent Role=”OrderDetails”>
<PropertyRef Name=”OrderId” />
</Dependent>
</ReferentialConstraint>
</Association>