ข้ามไปยังเนื้อหา

Class EntityFrameworkDataEngineBuilderExtensions

เนื้อหานี้ยังไม่ได้แปลเป็นภาษาไทย แสดงเป็นภาษาอังกฤษแทน

Namespace: Cephalon.Data.EntityFramework.Registration
Assembly: Cephalon.Data.EntityFramework.dll

Registers the Entity Framework Core data companion pack with an .

public static class EntityFrameworkDataEngineBuilderExtensions

objectEntityFrameworkDataEngineBuilderExtensions

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

AddEntityFrameworkData<TDbContext>(EngineBuilder, Action<DbContextOptionsBuilder>, Action<EntityFrameworkDataOptions>?)

Section titled “ AddEntityFrameworkData<TDbContext>(EngineBuilder, Action<DbContextOptionsBuilder>, Action<EntityFrameworkDataOptions>?)”

Adds the Entity Framework Core data pack with one shared type for both read and write workloads.

public static EngineBuilder AddEntityFrameworkData<TDbContext>(this EngineBuilder builder, Action<DbContextOptionsBuilder> configureDbContext, Action<EntityFrameworkDataOptions>? configure = null) where TDbContext : DbContext

builder EngineBuilder

The engine builder to extend.

configureDbContext Action<DbContextOptionsBuilder>

The callback that configures the shared Entity Framework Core .

configure Action<EntityFrameworkDataOptions>?

An optional callback that configures the host-owned Entity Framework pack options.

EngineBuilder

The same engine builder for fluent composition.

TDbContext

The shared type.

Pair this pack with AddData() when you want Cephalon-managed IReadStore and IWriteStore dispatching on top of the registered services.

AddEntityFrameworkData<TDbContext>(EngineBuilder, Action<EntityFrameworkDatabaseRoleContext, DbContextOptionsBuilder>, Action<EntityFrameworkDataOptions>?)

Section titled “ AddEntityFrameworkData<TDbContext>(EngineBuilder, Action<EntityFrameworkDatabaseRoleContext, DbContextOptionsBuilder>, Action<EntityFrameworkDataOptions>?)”

Adds the Entity Framework Core data pack with one shared type configured from the engine-owned Engine:Databases topology.

public static EngineBuilder AddEntityFrameworkData<TDbContext>(this EngineBuilder builder, Action<EntityFrameworkDatabaseRoleContext, DbContextOptionsBuilder> configureDbContext, Action<EntityFrameworkDataOptions>? configure = null) where TDbContext : DbContext

builder EngineBuilder

The engine builder to extend.

configureDbContext Action<EntityFrameworkDatabaseRoleContext, DbContextOptionsBuilder>

The callback that selects the EF Core provider for the resolved role and applies provider-specific tuning such as retries.

configure Action<EntityFrameworkDataOptions>?

An optional callback that configures the host-owned Entity Framework pack options.

EngineBuilder

The same engine builder for fluent composition.

TDbContext

The shared type.

This overload keeps the physical connection topology inside Engine:Databases while leaving the provider package selection with the consuming host or provider companion pack.

AddEntityFrameworkData<TReadDbContext, TWriteDbContext>(EngineBuilder, Action<DbContextOptionsBuilder>, Action<DbContextOptionsBuilder>, Action<EntityFrameworkDataOptions>?)

Section titled “ AddEntityFrameworkData<TReadDbContext, TWriteDbContext>(EngineBuilder, Action<DbContextOptionsBuilder>, Action<DbContextOptionsBuilder>, Action<EntityFrameworkDataOptions>?)”

Adds the Entity Framework Core data pack with explicit read and write types.

public static EngineBuilder AddEntityFrameworkData<TReadDbContext, TWriteDbContext>(this EngineBuilder builder, Action<DbContextOptionsBuilder> configureReadDbContext, Action<DbContextOptionsBuilder> configureWriteDbContext, Action<EntityFrameworkDataOptions>? configure = null) where TReadDbContext : DbContext where TWriteDbContext : DbContext

builder EngineBuilder

The engine builder to extend.

configureReadDbContext Action<DbContextOptionsBuilder>

The callback that configures the read-side Entity Framework Core .

configureWriteDbContext Action<DbContextOptionsBuilder>

The callback that configures the write-side Entity Framework Core .

configure Action<EntityFrameworkDataOptions>?

An optional callback that configures the host-owned Entity Framework pack options.

EngineBuilder

The same engine builder for fluent composition.

TReadDbContext

The read-side type.

TWriteDbContext

The write-side type.

Pair this pack with AddData() when you want Cephalon-managed IReadStore and IWriteStore dispatching on top of the registered services.

AddEntityFrameworkData<TReadDbContext, TWriteDbContext>(EngineBuilder, Action<EntityFrameworkDatabaseRoleContext, DbContextOptionsBuilder>, Action<EntityFrameworkDataOptions>?)

Section titled “ AddEntityFrameworkData<TReadDbContext, TWriteDbContext>(EngineBuilder, Action<EntityFrameworkDatabaseRoleContext, DbContextOptionsBuilder>, Action<EntityFrameworkDataOptions>?)”

Adds the Entity Framework Core data pack with distinct read and write types configured from the engine-owned Engine:Databases topology.

public static EngineBuilder AddEntityFrameworkData<TReadDbContext, TWriteDbContext>(this EngineBuilder builder, Action<EntityFrameworkDatabaseRoleContext, DbContextOptionsBuilder> configureDbContext, Action<EntityFrameworkDataOptions>? configure = null) where TReadDbContext : DbContext where TWriteDbContext : DbContext

builder EngineBuilder

The engine builder to extend.

configureDbContext Action<EntityFrameworkDatabaseRoleContext, DbContextOptionsBuilder>

The callback that selects the EF Core provider for each resolved role and applies provider-specific tuning such as retries.

configure Action<EntityFrameworkDataOptions>?

An optional callback that configures the host-owned Entity Framework pack options.

EngineBuilder

The same engine builder for fluent composition.

TReadDbContext

The read-side type.

TWriteDbContext

The write-side type.