Back to Devexpress

XafApplication.ObjectSpaceProviders Property

expressappframework-devexpress-dot-expressapp-dot-xafapplication-4b3827ea.md

latest4.1 KB
Original Source

XafApplication.ObjectSpaceProviders Property

Gets a list of Object Space Providers used by XafApplication.

Namespace : DevExpress.ExpressApp

Assembly : DevExpress.ExpressApp.v25.2.dll

NuGet Package : DevExpress.ExpressApp

Declaration

csharp
[Browsable(false)]
public IList<IObjectSpaceProvider> ObjectSpaceProviders { get; }
vb
<Browsable(False)>
Public ReadOnly Property ObjectSpaceProviders As IList(Of IObjectSpaceProvider)

Property Value

TypeDescription
IList<IObjectSpaceProvider>

An IList< IObjectSpaceProvider > list of Object Space Providers.

|

Remarks

XAF uses an Object Space Provider to create Object Spaces. The following Object Space Provider types are supplied with XAF:

Space ProviderObject Space
XPObjectSpaceProviderXPObjectSpace
EFCoreObjectSpaceProvider<TDbContext>EFCoreObjectSpace
SecuredObjectSpaceProviderSecuredXPObjectSpace
SecuredEFCoreObjectSpaceProvider<TDbContext>SecuredEFCoreObjectSpace
NonPersistentObjectSpaceProviderNonPersistentObjectSpace

XAF applications configure Object Space Providers through the Application Builder’s ObjectSpaceProviders property. When you use the Template Kit to create an application, it adds the Object Space Providers to your application based on the specified presets.

Refer to the following topic to learn how to add custom Object Space Providers to your application: Custom Object Space Provider.

Note

When multiple Object Space Providers are registered in the XafApplication.ObjectSpaceProviders property, the ModuleUpdater.UpdateDatabaseAfterUpdateSchema method is executed multiple times, once for each registered Provider. In this method, before accessing an object of a particular type, check if the current Object Space supports this type using the IObjectSpace.CanInstantiate method.

See Also

XafApplication Class

XafApplication Members

DevExpress.ExpressApp Namespace