IObjectSpace.GetObjects(Type) Method

Returns an IList collection of objects of the specified type, retrieved to the current Object Space.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v18.2.dll


IList GetObjects(
    Type type
Function GetObjects(
    type As Type
) As IList


Type Name Description
Type type

The type of the objects to be retrieved.


Type Description

A IList collection that contains the persistent objects of the specified type.

Below is an example of using the GetObjects method. Here, objectSpace is the Object Space instance which can be accessed as described in the Ways to Implement Business Logic topic.

IList allUsers = objectSpace.GetObjects(typeof(PermissionPolicyUser));

When implementing the IObjectSpace interface in the BaseObjectSpace class's descendant, don't implement the GetObjects method. It's implemented in the BaseObjectSpace class. To get the specified objects, the BaseObjectSpace.GetObjects(Type type) method invokes a protected virtual CreateCollection method that does nothing and returns null. So, you should override the CreateCollection method in your descendant.

See Also