Back to Devexpress

MiddleTierClientBuilder<TDbContext> Class

expressappframework-devexpress-dot-expressapp-dot-applicationbuilder-dot-middletierclientbuilder-1.md

latest2.6 KB
Original Source

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.2.dll

NuGet Package : DevExpress.ExpressApp.EFCore

Declaration

csharp
public class MiddleTierClientBuilder<TDbContext>
    where TDbContext :
    DbContext
vb
Public Class MiddleTierClientBuilder(Of TDbContext As DbContext)

Type Parameters

NameDescription
TDbContext

The type of a DbContext object.

|

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:

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.

csharp
var builder = new MiddleTierClientBuilder<MainDemoDbContext>()
    .UseServer("http://localhost:5000/")
    .UsePasswordAuthentication("user", "password");

IMiddleTierClient<MainDemoDbContext> client = builder.Build();

Inheritance

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)

DevExpress.ExpressApp.ApplicationBuilder Namespace