You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application.
The application uses the ADO.NET Entity Framework to model entities. You create an entity as shown in the following code fragment.
<EntityType Name=”ProductCategory”>
<Key>
<PropertyRef Name=”ProductCategoryID” />
</Key>
<Property Name=”ProductCategoryID” Type=”int” Nullable=”false” StoreGeneraedPattern=”Identity” />
<Property Name=”ParentProductCategoryID” Type=”int” />
<Property Name=”Name” Type=”nvarchar” Nullable=”false” MaxLength=”50″ />
…
</EntityType>
You need to provide two entity-tracking fields:
* rowguid that is automatically generated when the entity is created
* ModifiedDate that is automatically set whenever the entity is updated.
Which code fragment should you add to the .edmx file?
A.
<Property Name=”rowguid” Type=”uniqueidentifier” Nullable=”false” StoreGeneratedPattern=”Computed”/>
<Property Name=”ModifiedDate” Type=”timestamp” Nullable=”false” StoreGeneratedPattern=”Computed”/>
B.
<Property Name=”rowguid” Type=”uniqueidentifier” Nullable=”false” StoreGeneratedPattern=”Identity”/>
<Property Name=”ModifiedDate” Type=”timestamp” Nullable=”false” StoreGeneratedPattern=”Identity”/>
C.
<Property Name=”rowguid” Type=”uniqueidentifier” Nullable=”false” StoreGeneratedPattern=”Identity”/>
<Property Name=”ModifiedDate” Type=”timestamp” Nullable=”false” StoreGeneratedPattern=”Computed”/>
D.
<Property Name=”rowguid” Type=”uniqueidentifier” Nullable=”false” StoreGeneratedPattern=”Computed”/>
<Property Name=”ModifiedDate” Type=”timestamp” Nullable=”false” StoreGeneratedPattern=”Identity”/>
Explanation:
StoreGeneratedPattern Enumeration
(http://msdn.microsoft.com/en-us/library/system.data.metadata.edm.storegeneratedpattern.aspx)