This class can be used to simplify the process of creating and returning late-bound IDatabaseObject or DatabaseObject objects. This is is particularly useful in decreasing load times of referenced objects by post-poning loading any objects until the property or method is called directly. The referenced object is only loaded on the first call to the Object property. Subsequent calls return the already loaded object. A variable of this type can be marked with the FieldMapping attribute so that the distinct values are automatically set and read by the library (this particular facility can only be used by an object that inherits from DatabaseObjectsUsingAttributes).

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

Syntax

C#
public class ObjectReference<T> : ObjectReference
where T : IDatabaseObject
Visual Basic
Public Class ObjectReference(Of T As IDatabaseObject) _
	Inherits ObjectReference
Visual C++
generic<typename T>
where T : IDatabaseObject
public ref class ObjectReference : public ObjectReference

Type Parameters

T

[Missing <typeparam name="T"/> documentation for "T:DatabaseObjects.Generic.ObjectReference`1"]

Inheritance Hierarchy

System..::..Object
  DatabaseObjects..::..ObjectReference
    DatabaseObjects.Generic..::..ObjectReference<(Of <(<'T>)>)>

See Also