Skip to main content
A newer version of this page is available. .
.NET Framework 4.5.2+

CreateCustomObjectSpaceProviderEventArgs.ObjectSpaceProviders Property

Specifies a custom list of Object Space Providers to be used by the application.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v21.2.dll

NuGet Package: DevExpress.ExpressApp

Declaration

public List<IObjectSpaceProvider> ObjectSpaceProviders { get; }

Property Value

Type Description
List<IObjectSpaceProvider>

An IList<IObjectSpaceProvider> list of custom Object Space Providers to be used by the application.

Remarks

When several Object Space Providers are passed to the ObjectSpaceProviders property, the Object Space Provider appropriate for each particular business object type is determined automatically (see How to: Use Both Entity Framework 6 and XPO in a Single Application). However, if you want to create an Object Space manually, use an overload of the XafApplication.CreateObjectSpace method that takes the objectType parameter.

The passed list is assigned to the XafApplication.ObjectSpaceProviders property.

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.

XAF uses the first registered Object Space Provider for the following purposes:

Ensure that NonPersistentObjectSpaceProvider is not the first registered Provider in your application.

See Also