Which entity SQL query should you use?

You create an application by using Microsoft .NET Framework 3.5. You use Microsoft ADO.NET Entity Framework for persistence.

You write a conceptual schema definition for the entity data model in the following manner.

<EntityType Name="Customer">
<Key>
<PropertyRef Name="CustomerID" />
</Key>
<Property Name="CustomerID" Type="Int32" Nullable="false" />
</EntityType>
<EntityType Name="Order">
<Property Name="InvoiceNo" Type="String" MaxLength="10" FixedLength="true" />
<NavigationProperty Name="Customer" Relationship="ContosoModel.FK_Customer_Order" FromRole="Order" ToRole="Customer" />
</EntityType>

You need to retrieve all the InvoiceNo property values for the Customer entity instance that has the CustomerID property value as 1.

Which entity SQL query should you use?

You create an application by using Microsoft .NET Framework 3.5. You use Microsoft ADO.NET Entity Framework for persistence.

You write a conceptual schema definition for the entity data model in the following manner.

<EntityType Name="Customer">
<Key>
<PropertyRef Name="CustomerID" />
</Key>
<Property Name="CustomerID" Type="Int32" Nullable="false" />
</EntityType>
<EntityType Name="Order">
<Property Name="InvoiceNo" Type="String" MaxLength="10" FixedLength="true" />
<NavigationProperty Name="Customer" Relationship="ContosoModel.FK_Customer_Order" FromRole="Order" ToRole="Customer" />
</EntityType>

You need to retrieve all the InvoiceNo property values for the Customer entity instance that has the CustomerID property value as 1.

Which entity SQL query should you use?

A.
SELECT o.InvoiceNo FROM ContosoEntities.Order as o,ContosoEntities.Customer as c WHERE c.CustomerID=1

B.
SELECT o.InvoiceNo FROM ContosoEntities.Order as o, ROW(o.Customer) as c WHERE c.CustomerID=1

C.
SELECT o.InvoiceNo FROM ContosoEntities.Order as o WHERE (Select REF(c) from ContosoEntities.Customer as c WHERE CustomerID=1)

D.
SELECT o.InvoiceNo FROM ContosoEntities.Order as o, o.Customer as c WHERE c.CustomerID=1



Leave a Reply 0

Your email address will not be published. Required fields are marked *