| Visual Basic (Declaration) | |
|---|---|
Overloads Public Overridable Function GetObject(Of T)( _ ByVal customPersister As ICustomPersister, _ ByVal query As IQuery _ ) As ICustomPersister | |
| Visual Basic (Usage) | |
|---|---|
| |
| C# | |
|---|---|
public virtual ICustomPersister GetObject<T>( ICustomPersister customPersister, IQuery query ) | |
| Managed Extensions for C++ | |
|---|---|
public: virtual ICustomPersister* GetObject<T>( ICustomPersister* customPersister, IQuery* query ) | |
| C++/CLI | |
|---|---|
public: virtual ICustomPersister^ GetObjectgeneric<typename T> ( ICustomPersister^ customPersister, IQuery^ query ) | |
Parameters
- customPersister
- The class implementing the ICustomPersister interface.
- query
- An instance of a class that implements the IQuery interface. This query is compiled and used to retrieve the object from the storage.
Type Parameters
- T
Return Value
The first object implementing the ICustomPersister interface.The following example introduces to the use of the GetObject routine
with the ICustomPersister interface.
| C# | |
|---|---|
// Creates a new ObjectContext that uses an MsSql Server as storage. | |
Populates the class implementing the ICustomPersister with data
from the storage. The class gets the control on how to load the objects from the storage. A query
is also given to have the object loaded the objects matching the query. There is no guarantuee that
the object loads exactly the objects returned by the query, since it controls the loading process
by itself.
Requirements
Platforms: Windows 2000, Windows XP family, Windows Server 2003 family, Windows Vista family