MiddleTierClientBuilder<TDbContext> Class
Configures a client for a Middle Tier server with a specified DbContext
type.
Namespace: DevExpress.ExpressApp.ApplicationBuilder
Assembly: DevExpress.EntityFrameworkCore.Security.v25.1.dll
NuGet Package: DevExpress.ExpressApp.EFCore
Declaration
Type Parameters
Name | Description |
---|---|
TDbContext | The type of a |
Remarks
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.
- Call the UseServer(String) method to specify the base Middle Tier server address.
Call one of the following methods to configure the client authentication method:
Note that one Middle Tier client can only use one authentication method. To support multiple methods, use different
MiddleTierClientBuilder
objects to create separate clients for each authentication method.
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();