EntityManagerGenerateId Method Breeze.sharp
Generates a temporary ID for an IEntity. The temporary ID will be mapped to a real ID when SaveChanges(SaveOptions) is called.

Namespace: Breeze.Sharp
Assembly: Breeze.Sharp (in Breeze.Sharp.dll) Version: 0.6.0.5 (0.6.0.5)
Syntax

public UniqueId GenerateId(
	IEntity entity,
	DataProperty entityProperty
)

Parameters

entity
Type: Breeze.SharpIEntity
The Entity object for which the new ID will be generated
entityProperty
Type: Breeze.SharpDataProperty
The EntityProperty in which the new ID will be set

Return Value

Type: UniqueId
Exceptions

ExceptionCondition
ArgumentExceptionIncorrect entity type/property
[!:IdeaBladeException]IdGenerator not found
Remarks

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.

See Also

Reference

[!:IIdGenerator]