Store Generated Pattern (SSDL)

In the Entity Data Model (EDM), the store schema definition language (SSDL) file defines a computed property using the attribute StoreGeneratedPattern. StoreGeneratedPattern="Computed" signals the update pipeline to retrieve the value from storage rather than setting it. The property must be computed from values in storage.

Note

This attribute is not currently generated by Edmgen.exe and must be added manually.

In the following SSDL schema, the properties TotalDue and ModifiedDate are attributed as store-generated.

  <EntityType Name="SalesOrderHeader">
    <Key>
      <PropertyRef Name="SalesOrderID" />
    </Key>
    <Property Name="SalesOrderID" Type="int" Nullable="false" 
              StoreGeneratedPattern="Identity" />
    <!-- Other properties -->
   
    <Property Name="CurrencyRateID" Type="int" />
    <Property Name="SubTotal" Type="money" Nullable="false" />
    <Property Name="TaxAmt" Type="money" Nullable="false" />
    <Property Name="Freight" Type="money" Nullable="false" />
    <Property Name="TotalDue" Type="money" Nullable="false"
                                StoreGeneratedPattern="Computed"/>
    <Property Name="ModifiedDate" Type="datetime" Nullable="false"
                                StoreGeneratedPattern="Computed"/>
  </EntityType>

See Also

Other Resources

Schemas and Mapping Specification (Entity Framework)