Skip to main content
All docs
V25.2
  • NonPersistentObjectSpaceProviderOptions.CustomCreateObjectSpaceProvider Property

    Allows you to create a custom Object Space provider.

    Namespace: DevExpress.ExpressApp.ApplicationBuilder

    Assembly: DevExpress.ExpressApp.v25.2.dll

    NuGet Package: DevExpress.ExpressApp

    Declaration

    public Func<CustomCreateObjectSpaceProviderContext, IObjectSpaceProvider> CustomCreateObjectSpaceProvider { get; set; }

    Property Value

    Type Description
    Func<CustomCreateObjectSpaceProviderContext, IObjectSpaceProvider>

    A delegate that accepts an instance of CustomCreateObjectSpaceProviderContext and must return the custom Object Space provider.

    Remarks

    You can use this property to create a custom Object Space provider used to manage non-persistent objects in WinForms, Blazor, and WebAPI applications.

    builder.ObjectSpaceProviders 
        .AddNonPersistent((serviceProvider, options) => { 
            options.CustomCreateObjectSpaceProvider = (context) => { 
                return new MyCustomNonPersistentObjectSpaceProvider(...); 
            }; 
        }); 
    
    See Also