Back to Devexpress

IObjectSpaceFactory.CreateObjectSpace(Type) Method

expressappframework-devexpress-dot-expressapp-dot-iobjectspacefactory-dot-createobjectspace-x28-system-dot-type-x29.md

latest3.0 KB
Original Source

IObjectSpaceFactory.CreateObjectSpace(Type) Method

Creates an Object Space for the specified business object type.

Namespace : DevExpress.ExpressApp

Assembly : DevExpress.ExpressApp.v25.2.dll

NuGet Package : DevExpress.ExpressApp

Declaration

csharp
IObjectSpace CreateObjectSpace(
    Type objectType
)
vb
Function CreateObjectSpace(
    objectType As Type
) As IObjectSpace

Parameters

NameTypeDescription
objectTypeType

The method creates a non-secured Object Space for this business object type.

|

Returns

TypeDescription
IObjectSpace

An Object Space for the specified business object type.

|

Remarks

Refer to the following help topics to find examples on how to use this method in different scenarios:

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the CreateObjectSpace(Type) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

connect-winforms-grid-to-webapi-service/CS/OData.Server/API/Security/CheckPermissionController.cs#L29

csharp
var type = _typesInfo.FindTypeInfo(typeName)?.Type;
using(var objectSpace = _securedObjectSpaceFactory.CreateObjectSpace(type)) {
    var key = objectSpace.GetObjectKey(type, objectKey);

See Also

IObjectSpaceFactory Interface

IObjectSpaceFactory Members

DevExpress.ExpressApp Namespace