Back to Devexpress

Connect a Non-XAF Application to a Middle Tier Security Server (EF Core)

expressappframework-404398-data-security-and-safety-security-system-non-xaf-connect-to-ef-core-middle-tier-service-from-non-xaf-applications.md

latest3.1 KB
Original Source

Connect a Non-XAF Application to a Middle Tier Security Server (EF Core)

  • Aug 27, 2025
  • 2 minutes to read

The following steps outline how to connect a non-XAF .NET application to a database through the EF Core-based Middle Tier Security application.

Note

The technique described in this topic was not tested with .NET MAUI and Blazor WebAssembly clients. With these platforms, we recommend that you use our Web API Service on the backend as demonstrated in the following examples on GitHub:

  1. Install the following NuGet package: DevExpress.ExpressApp.EFCore.

  2. Create a Middle Tier client:

  3. After the client successfully connects to the Middle Tier server and passes authentication, you can access security permissions for the current user.

  4. You can use the Middle Tier Security as a database provider to access data through an EF Core DbContext or Object Space:

  5. You need to dispose the Middle Tier client when it is no longer needed:

Tip

You can use DevExpress Template Kit for Visual Studio to create WinForms and WPF applications that implement the described approach.

See Also

GitHub example: Connect the DevExpress WinForms Data Grid to a Backend using a Middle Tier Server (EF Core without OData)

GitHub example: Role-based Access Control, Permission Management, and OData / Web / REST API Services for Entity Framework and XPO ORM

Middle Tier Security with EF Core

Create an Application with EF Core Middle Tier Security

Add EF Core Middle Tier Security to an Existing WinForms Application

Backend Web API Service / REST API

Ways to protect database connection strings in desktop, web, or mobile clients 

Data Access Security