| Visual Basic (Declaration) | |
|---|---|
Public Function GenerateId( _ ByVal entity As Object, _ ByVal entityProperty As DataEntityProperty _ ) As UniqueId | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim instance As EntityManager Dim entity As Object Dim entityProperty As DataEntityProperty Dim value As UniqueId value = instance.GenerateId(entity, entityProperty) | |
| C# | |
|---|---|
public UniqueId GenerateId( object entity, DataEntityProperty entityProperty ) | |
| C++/CLI | |
|---|---|
public: UniqueId^ GenerateId( Object^ entity, DataEntityProperty^ entityProperty ) | |
Parameters
- entity
- The Entity object for which the new ID will be generated
- entityProperty
- The EntityProperty in which the new ID will be set
| Exception | Description |
|---|---|
| System.ArgumentException | Incorrect entity type/property |
| IdeaBlade.Core.IdeaBladeException | IdGenerator not found |
You must implement the IIdGenerator interface to use ID generation. See the DevForce Developer's Guide for more information on custom ID generation.
If you are using a SQL Server Identity property you do not need to call GenerateId for the property.
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