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 EntityFrameworkDataEngineBuilderExtensionsInheritance
Section titled “Inheritance”object ← EntityFrameworkDataEngineBuilderExtensions
Inherited Members
Section titled “Inherited Members”object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Methods
Section titled “Methods”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
public static EngineBuilder AddEntityFrameworkData<TDbContext>(this EngineBuilder builder, Action<DbContextOptionsBuilder> configureDbContext, Action<EntityFrameworkDataOptions>? configure = null) where TDbContext : DbContextParameters
Section titled “Parameters”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.
Returns
Section titled “Returns”The same engine builder for fluent composition.
Type Parameters
Section titled “Type Parameters”TDbContext
The shared
Remarks
Section titled “Remarks”Pair this pack with AddData() when you want Cephalon-managed IReadStore and IWriteStore
dispatching on top of the registered
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 Engine:Databases topology.
public static EngineBuilder AddEntityFrameworkData<TDbContext>(this EngineBuilder builder, Action<EntityFrameworkDatabaseRoleContext, DbContextOptionsBuilder> configureDbContext, Action<EntityFrameworkDataOptions>? configure = null) where TDbContext : DbContextParameters
Section titled “Parameters”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.
Returns
Section titled “Returns”The same engine builder for fluent composition.
Type Parameters
Section titled “Type Parameters”TDbContext
The shared
Remarks
Section titled “Remarks”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
public static EngineBuilder AddEntityFrameworkData<TReadDbContext, TWriteDbContext>(this EngineBuilder builder, Action<DbContextOptionsBuilder> configureReadDbContext, Action<DbContextOptionsBuilder> configureWriteDbContext, Action<EntityFrameworkDataOptions>? configure = null) where TReadDbContext : DbContext where TWriteDbContext : DbContextParameters
Section titled “Parameters”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.
Returns
Section titled “Returns”The same engine builder for fluent composition.
Type Parameters
Section titled “Type Parameters”TReadDbContext
The read-side
TWriteDbContext
The write-side
Remarks
Section titled “Remarks”Pair this pack with AddData() when you want Cephalon-managed IReadStore and IWriteStore
dispatching on top of the registered
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 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 : DbContextParameters
Section titled “Parameters”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.
Returns
Section titled “Returns”The same engine builder for fluent composition.
Type Parameters
Section titled “Type Parameters”TReadDbContext
The read-side
TWriteDbContext
The write-side