Class KEFCoreDbContextOptionsExtensions
- Namespace
- MASES.EntityFrameworkCore.KNet
- Assembly
- MASES.EntityFrameworkCore.KNet.dll
KEFCore specific extension methods for DbContextOptionsBuilder.
public static class KEFCoreDbContextOptionsExtensions
- Inheritance
-
KEFCoreDbContextOptionsExtensions
- Inherited Members
Methods
JVMKeyType(IKEFCoreSingletonOptions, IEntityType)
Create the ValueContainer Type
public static Type JVMKeyType(this IKEFCoreSingletonOptions options, IEntityType entityType)
Parameters
optionsIKEFCoreSingletonOptionsentityTypeIEntityType
Returns
JVMValueContainerType(IKEFCoreSingletonOptions, IEntityType)
Create the ValueContainer Type
public static Type JVMValueContainerType(this IKEFCoreSingletonOptions options, IEntityType entityType)
Parameters
optionsIKEFCoreSingletonOptionsentityTypeIEntityType
Returns
KeyType(IKEFCoreSingletonOptions, IEntityType)
Creates a serializer Type for keys
public static Type KeyType(this IKEFCoreSingletonOptions options, IEntityType entityType)
Parameters
optionsIKEFCoreSingletonOptionsentityTypeIEntityType
Returns
SerDesSelectorForKey(IKEFCoreSingletonOptions, IEntityType)
Creates a serializer Type for keys
public static ISerDesSelector? SerDesSelectorForKey(this IKEFCoreSingletonOptions options, IEntityType entityType)
Parameters
optionsIKEFCoreSingletonOptionsentityTypeIEntityType
Returns
SerDesSelectorForValue(IKEFCoreSingletonOptions, IEntityType)
Creates a serialzier Type for values
public static ISerDesSelector? SerDesSelectorForValue(this IKEFCoreSingletonOptions options, IEntityType entityType)
Parameters
optionsIKEFCoreSingletonOptionsentityTypeIEntityType
Returns
UseKEFCore(DbContextOptionsBuilder, string?, string, Action<KEFCoreDbContextOptionsBuilder>?)
Configures the context to connect to a named Apache Kafka cluster. The Apache Kafka cluster is shared anywhere the same name is used, but only for a given service provider.
public static DbContextOptionsBuilder UseKEFCore(this DbContextOptionsBuilder optionsBuilder, string? applicationId, string bootstrapServers, Action<KEFCoreDbContextOptionsBuilder>? kefcoreOptionsAction = null)
Parameters
optionsBuilderDbContextOptionsBuilderThe builder being used to configure the context.
applicationIdstringThe name of the application will use
bootstrapServers. This allows the scope of the Apache Kafka cluster to be controlled independently of the context. The Apache Kafka cluster is shared anywhere the same name is used.bootstrapServersstringThe bootstrap servers of the Kafka cluster.
kefcoreOptionsActionAction<KEFCoreDbContextOptionsBuilder>An optional action to allow additional Kafka specific configuration.
Returns
- DbContextOptionsBuilder
The options builder so that further configuration can be chained.
Remarks
See Using DbContextOptions, and The EF Core Apache Kafka cluster provider for more information and examples.
UseKEFCore<TContext>(DbContextOptionsBuilder<TContext>, string, string, Action<KEFCoreDbContextOptionsBuilder>?)
Configures the context to connect to an Apache Kafka cluster. The Apache Kafka cluster is shared anywhere the same name is used, but only for a given service provider.
public static DbContextOptionsBuilder<TContext> UseKEFCore<TContext>(this DbContextOptionsBuilder<TContext> optionsBuilder, string applicationId, string bootstrapServers, Action<KEFCoreDbContextOptionsBuilder>? kefcoreOptionsAction = null) where TContext : DbContext
Parameters
optionsBuilderDbContextOptionsBuilder<TContext>The builder being used to configure the context.
applicationIdstringThe name of the application will use
bootstrapServers. This allows the scope of the Apache Kafka cluster to be controlled independently of the context. The Apache Kafka cluster is shared anywhere the same name is used.bootstrapServersstringThe bootstrap servers of the Kafka cluster.
kefcoreOptionsActionAction<KEFCoreDbContextOptionsBuilder>An optional action to allow additional Apache Kafka cluster specific configuration.
Returns
- DbContextOptionsBuilder<TContext>
The options builder so that further configuration can be chained.
Type Parameters
TContextThe type of context being configured.
Remarks
See Using DbContextOptions, and The EF Core Apache Kafka cluster provider for more information and examples.
ValueContainerType(IKEFCoreSingletonOptions, IEntityType)
Create the ValueContainer Type
public static Type ValueContainerType(this IKEFCoreSingletonOptions options, IEntityType entityType)
Parameters
optionsIKEFCoreSingletonOptionsentityTypeIEntityType