nerdexam
Microsoft

70-516 · Question #2

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 correct answer is C. <Property Name="rowguid" Type="uniqueidentifier" Nullable="false". StoreGeneratedPattern Enumeration

define service contracts, data contracts, and message contracts

Question

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?

Options

  • A<Property Name="rowguid" Type="uniqueidentifier" Nullable="false"
  • B<Property Name="rowguid" Type="uniqueidentifier" Nullable="false"
  • C<Property Name="rowguid" Type="uniqueidentifier" Nullable="false"
  • D<Property Name="rowguid" Type="uniqueidentifier" Nullable="false"

How the community answered

(39 responses)
  • A
    3% (1)
  • B
    10% (4)
  • C
    82% (32)
  • D
    5% (2)

Explanation

StoreGeneratedPattern Enumeration

Topics

#Entity Framework#entity tracking#EDMX#ConcurrencyMode

Community Discussion

No community discussion yet for this question.

Full 70-516 Practice