Back to Devexpress

IObjectSpaceFactory.CreateObjectSpace(Type, String) Method

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

latest3.5 KB
Original Source

IObjectSpaceFactory.CreateObjectSpace(Type, String) Method

Creates an object space for the specified business object type in a multi-tenant application.

Namespace : DevExpress.ExpressApp

Assembly : DevExpress.ExpressApp.v25.2.dll

NuGet Package : DevExpress.ExpressApp

Declaration

csharp
virtual IObjectSpace CreateObjectSpace(
    Type objectType,
    string tenantName
)
vb
Overridable Function CreateObjectSpace(
    objectType As Type,
    tenantName As String
) As IObjectSpace

Parameters

NameTypeDescription
objectTypeType

The type for which the method creates an object space.

| | tenantName | String |

The name of a tenant or null to create an object space for shared business objects.

|

Returns

TypeDescription
IObjectSpace

An object space for the specified type.

|

Remarks

In multi-tenant applications, the host database can maintain shared business objects. Tenants can read this data, but cannot modify it. Host UI administrators have complete CRUD control over host and tenant data.

Call the CreateObjectSpace method to create an object space to access the following data:

  • Tenant business objects from the host account
  • Host-shared business objects from a tenant account

Refer to the following help topic for more information: Shared Data Support in a Multi-Tenant Application.

Tip

In a tenant account, you can use CreateObjectSpace methods without the tenantName parameter to get the same result.

See Also

Shared Data Support in a Multi-Tenant Application

Access Object Space, Security System, and Caption Helper in the ASP.NET Core Environment

Access Object Space, Security System, and Caption Helper in Custom Endpoint Methods

Ways to Access an Object Space (the Database Context for CRUD Operations)

Create Custom Endpoints

IObjectSpaceFactory Interface

IObjectSpaceFactory Members

DevExpress.ExpressApp Namespace