.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+

CreateCustomObjectSpaceProviderEventArgs.ObjectSpaceProviders Property

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

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v19.2.dll

Declaration

public List<IObjectSpaceProvider> ObjectSpaceProviders { get; }
Public ReadOnly Property ObjectSpaceProviders As List(Of IObjectSpaceProvider)
public List<IObjectSpaceProvider> ObjectSpaceProviders { get; }
Public ReadOnly Property ObjectSpaceProviders As List(Of IObjectSpaceProvider)
public List<IObjectSpaceProvider> ObjectSpaceProviders { get; }
Public ReadOnly Property ObjectSpaceProviders As List(Of IObjectSpaceProvider)

Property Value

Type Description
List<IObjectSpaceProvider>

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

Property Value

Type Description
List<IObjectSpaceProvider>

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

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 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