Back to Devexpress

IObjectSpaceFactory Interface

expressappframework-devexpress-dot-expressapp-7c74ccbb.md

latest4.7 KB
Original Source

IObjectSpaceFactory Interface

Provides access to Object Spaces in ASP.NET Core applications.

Namespace : DevExpress.ExpressApp

Assembly : DevExpress.ExpressApp.v25.2.dll

NuGet Package : DevExpress.ExpressApp

Declaration

csharp
public interface IObjectSpaceFactory
vb
Public Interface IObjectSpaceFactory

Remarks

The IObjectSpaceFactory service allows you to use the DI-accessible API to create Object Spaces.

In ASP.NET Core Blazor and Web API applications, IObjectSpaceFactory services use IObjectSpaceProviderFactory to create the collection of IObjectSpaceProvider objects. The Template Kit registers this service automatically.

The IObjectSpaceFactory service is the counterpart of the CreateObjectSpace(Type) method. The main difference between these techniques is that the service does not require an application instance. This improves your application performance but leads to the following restriction:

You can use the following Object Space Factories in different scenarios:

IObjectSpaceFactoryCreates Object Spaces for secured operations. In applications with the Security System, it checks whether the current user is logged on. If the user is not logged on, it throws an authorization exception (refer to the following topic for information on how to avoid this exception: Access Object Space, Security System, Caption Helper, and XAF Modules in the ASP.NET Core Environment). Protected data is available depending on current user permissions. In applications without the Security System, this service operates the same way as INonSecuredObjectSpaceFactory.INonSecuredObjectSpaceFactoryCreates Object Spaces for non-secured operations. These Object Spaces have full access to all objects and operations, regardless of user permission settings.IUpdatingObjectSpaceFactoryCreates secured Object Spaces with additional permissions required for database update (for example, for new table creation). For more information, refer to the following method description: IObjectSpaceProvider.CreateUpdatingObjectSpace.

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

Extension Methods

CreateObjectSpace<T>()

CreateObjectSpace<T>(String)

See Also

IObjectSpaceFactory Members

CreateObjectSpace

ObjectSpaceProviders

IObjectSpaceProviderFactory

INonSecuredObjectSpaceFactory

DevExpress.ExpressApp Namespace