All docs
V20.1
20.2 (EAP/Beta)
20.1
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.
.NET Standard 2.0+
.NET Framework 4.5.2+
The page you are viewing does not exist in the .NET Framework 4.5.2+ platform documentation. This link will take you to the parent topic of the current section.
.NET Standard 2.0+
.NET Core 3.0+

EFCoreObjectSpaceProvider Class

Provides an Object Space in EF Core-based applications that do not use the Security System.

Namespace: DevExpress.ExpressApp.EFCore

Assembly: DevExpress.ExpressApp.EFCore.v20.1.dll

Declaration

public class EFCoreObjectSpaceProvider :
    IObjectSpaceProvider,
    IDisposable
Public Class EFCoreObjectSpaceProvider
    Implements IObjectSpaceProvider,
               IDisposable

Remarks

In applications with the Security System, use the SecuredEFCoreObjectSpaceProvider instead of EFCoreObjectSpaceProvider.

The following example shows how to create EFCoreObjectSpaceProvider in a non-XAF application.

using DevExpress.ExpressApp;
using DevExpress.ExpressApp.EFCore;
using Microsoft.EntityFrameworkCore;
using System;
using System.Configuration;
// ...
class Program {
    static void Main() {
        string connectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
        EFCoreObjectSpaceProvider objectSpaceProvider = new EFCoreObjectSpaceProvider(typeof(ApplicationDbContext),
            (builder, _) => builder.UseSqlServer(connectionString));
        // ...
    }
}

You can find the full example in the following GitHub repository: .NET User Authentication and Group Authorization API for DevExpress XPO and Microsoft Entity Framework Core ORMs.

Inheritance

See Also