Ensures that the key field (KeyFieldName for parent collection class) value is unique within the collection.
The value passed to the ConstraintBinding must by the key field value.
The constraint ensure s that if the object is new then the key field value must be unique within the entire collection (the collection's SubSet applies).
Otherwise, if the new object is already saved and the key field value has changed then it is ensured to be unique within the collection (the collection's SubSet applies).
Namespace: DatabaseObjects.ConstraintsAssembly: DatabaseObjects (in DatabaseObjects.dll) Version: 3.8.1.0
Syntax
C# |
---|
public class KeyFieldIsUniqueInCollectionConstraint<T> : IConstraint<T> |
Visual Basic |
---|
Public Class KeyFieldIsUniqueInCollectionConstraint(Of T) _ Implements IConstraint(Of T) |
Visual C++ |
---|
generic<typename T> public ref class KeyFieldIsUniqueInCollectionConstraint : IConstraint<T> |
Type Parameters
- T
- The key field data type (typically string)
Remarks
Inheritance Hierarchy
System..::..Object
DatabaseObjects.Constraints..::..KeyFieldIsUniqueInCollectionConstraint<(Of <(<'T>)>)>
DatabaseObjects.Constraints..::..KeyFieldIsUniqueInCollectionConstraint<(Of <(<'T>)>)>