IdeaBlade DevForce 2010 Help Reference
StoreGeneratedIdGenerator Class
Members  See Also  Send Feedback
IdeaBlade.EntityModel Assembly > IdeaBlade.EntityModel Namespace : StoreGeneratedIdGenerator Class



IIdGenerator providing intrinsic framework support for store-generated IDs.

Object Model

StoreGeneratedIdGenerator ClassIIdGenerator InterfaceUniqueIdCollection Class

Syntax

Visual Basic (Declaration) 
<DataContractAttribute()>
<DefaultExportAttribute(IsDefault=True, 
   ContractName="", 
   ContractType=IdeaBlade.EntityModel.IIdGenerator)>
<ExportMetadataAttribute(Name="IsFake", IsMultiple=False)>
Public Class StoreGeneratedIdGenerator 
   Implements IIdentityIdGeneratorIIdGenerator 
Visual Basic (Usage)Copy Code
Dim instance As StoreGeneratedIdGenerator
C# 
[DataContractAttribute()]
[DefaultExportAttribute(IsDefault=true, 
   ContractName="", 
   ContractType=IdeaBlade.EntityModel.IIdGenerator)]
[ExportMetadataAttribute(Name="IsFake", IsMultiple=false)]
public class StoreGeneratedIdGenerator : IIdentityIdGeneratorIIdGenerator  
C++/CLI 
[DataContractAttribute()]
[DefaultExportAttribute(IsDefault=true, 
   ContractName="", 
   ContractType=IdeaBlade.EntityModel.IIdGenerator)]
[ExportMetadataAttribute(Name="IsFake", IsMultiple=false)]
public ref class StoreGeneratedIdGenerator : public IIdentityIdGeneratorIIdGenerator  

Remarks

This IdGenerator will automatically be used to provide a temporary property value for any new entities whose primary key is marked with the StoreGeneratedPattern="Identity" attribute in its entity model. You do not need to call EntityManager.GenerateId for these properties, as this key generation is done for you.

If you do not wish to use this generator for your Identity properties you will need to provide a stub or custom implementation of IIdentityIdGenerator.

The Entity Framework uses the StoreGeneratedPattern attribute to indicate properties whose value is provided by the data source after the row has been saved. The StoreGeneratedIdGenerator allows you to assign temporary values to these key fields, and will automatically map these temporary IDs to the real IDs assigned by the data source.

Inheritance Hierarchy

System.Object
   IdeaBlade.EntityModel.StoreGeneratedIdGenerator

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2013 All Rights Reserved.