INonSecuredObjectSpaceFactory Interface
Provides access to the non-secured Object Space in ASP.NET Core applications.
Namespace: DevExpress.ExpressApp
Assembly: DevExpress.ExpressApp.v25.2.dll
Declaration
Remarks
The INonSecuredObjectSpaceFactory service allows you to use the DI-accessible API to create Object Spaces.
In ASP.NET Core Blazor and Web API applications, INonSecuredObjectSpaceFactory services use IObjectSpaceProviderFactory to create the collection of IObjectSpaceProvider objects. The Template Kit registers this service automatically.
The INonSecuredObjectSpaceFactory 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:
- Customizations made in the application context (for example, in the XafApplication.ObjectSpaceCreated event handler) are ignored.
You can use the following Object Space Factories in different scenarios:
- IObjectSpaceFactory
- Creates 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. INonSecuredObjectSpaceFactory- Creates Object Spaces for non-secured operations. These Object Spaces have full access to all objects and operations, regardless of user permission settings.
IUpdatingObjectSpaceFactory- Creates 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.