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



Interface for generation of unique IDs for new IEntity objects.

Syntax

Visual Basic (Declaration) 
<InterfaceExportAttribute(ContractName="", ContractType=IdeaBlade.EntityModel.IIdGenerator)>
Public Interface IIdGenerator 
Visual Basic (Usage)Copy Code
Dim instance As IIdGenerator
C# 
[InterfaceExportAttribute(ContractName="", ContractType=IdeaBlade.EntityModel.IIdGenerator)]
public interface IIdGenerator 
C++/CLI 
[InterfaceExportAttribute(ContractName="", ContractType=IdeaBlade.EntityModel.IIdGenerator)]
public interface class IIdGenerator 

Remarks

The IIdGenerator interface defines methods to generate both temporary and real IDs for IEntity objects, and to map the temporary IDs to real IDs when objects are persisted to a backend data source. Temporary IDs are created via a call to EntityManager.GenerateId, and allow entities to be created and uniquely identified while the EntityManager is disconnected from a backend database. Temporary IDs are mapped to real IDs during EntityManager.SaveChanges processing.

Sample code in both VB.NET and C# showing an implementation for ID values of the long datatype is provided with the DevForce installation.

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.