Sets or returns the distinct value of the object. If Object returns Nothing then Nothing is returned. Simulates using Me.Object.DistinctValue except that loading of the associated object is avoided if the Me.Object get property had not been called and the object loaded from the database. If the ObjectReference class is used with the FieldMapping attribute then this property is set and read automatically when respectively loading and saving the object. See Example 1 below for details.

Namespace: DatabaseObjects
Assembly: DatabaseObjects (in DatabaseObjects.dll) Version: 3.8.1.0

Syntax

C#
public Object DistinctValue { get; set; }
Visual Basic
Public Property DistinctValue As Object
	Get
	Set
Visual C++
public:
property Object^ DistinctValue {
	Object^ get ();
	void set (Object^ value);
}

Examples

CopyC#
Example 1:

<DatabaseObjects.FieldMapping("ProductGroupID")> _
Private pobjGroup As New Generic.ObjectReference(Of ProductGroup, Integer)(Database.ProductGroups)

Example 2:

Private pobjGroup As New Generic.ObjectReference(Of ProductGroup, Integer)(Database.ProductGroups)

<DatabaseObjects.FieldMapping("ProductGroupID")> _
Private Property GroupID() As Integer
    Get

        Return pobjGroup.DistinctValue

    End Get

    Set(ByVal Value As Integer)

        pobjGroup.DistinctValue = Value

    End Set
End Property

See Also