expressappframework-devexpress-dot-expressapp-dot-applicationbuilder-dot-middletierclientbuilder-1.md
Configures a client for a Middle Tier server with a specified DbContext type.
Namespace : DevExpress.ExpressApp.ApplicationBuilder
Assembly : DevExpress.EntityFrameworkCore.Security.v25.2.dll
NuGet Package : DevExpress.ExpressApp.EFCore
public class MiddleTierClientBuilder<TDbContext>
where TDbContext :
DbContext
Public Class MiddleTierClientBuilder(Of TDbContext As DbContext)
| Name | Description |
|---|---|
| TDbContext |
The type of a DbContext object.
|
Use MiddleTierClientBuilder to configure and create an immutable client for a Middle Tier server. Ensure all configurations are set before creation. Once created, the client cannot be modified.
The following code sample creates a new client connected to the remote Middle Tier server at http://localhost:5000/ and specifies authentication login and password.
var builder = new MiddleTierClientBuilder<MainDemoDbContext>()
.UseServer("http://localhost:5000/")
.UsePasswordAuthentication("user", "password");
IMiddleTierClient<MainDemoDbContext> client = builder.Build();
Object MiddleTierClientBuilder<TDbContext>
See Also
MiddleTierClientBuilder<TDbContext> Members
Middle Tier Security with EF Core
Connect a Non-XAF Application to a Middle Tier Security Server (EF Core)