Table of Contents

Class KafkaConventionSetBuilder

Namespace
MASES.EntityFrameworkCore.KNet.Metadata.Conventions
Assembly
MASES.EntityFrameworkCore.KNet.dll

A builder for building conventions for th Kafka provider.

public class KafkaConventionSetBuilder : ProviderConventionSetBuilder, IProviderConventionSetBuilder
Inheritance
KafkaConventionSetBuilder
Implements
Inherited Members

Remarks

The service lifetime is Scoped and multiple registrations are allowed. This means that each DbContext instance will use its own set of instances of this service. The implementations may depend on other services registered with any lifetime. The implementations do not need to be thread-safe.

See Model building conventions, and The EF Core Kafka database provider for more information and examples.

Constructors

KafkaConventionSetBuilder(ProviderConventionSetBuilderDependencies)

Creates a new KafkaConventionSetBuilder instance.

public KafkaConventionSetBuilder(ProviderConventionSetBuilderDependencies dependencies)

Parameters

dependencies ProviderConventionSetBuilderDependencies

The core dependencies for this service.

Methods

Build()

Call this method to build a ConventionSet for the Kafka provider when using the ModelBuilder outside of OnModelCreating(ModelBuilder).

public static ConventionSet Build()

Returns

ConventionSet

The convention set.

Remarks

Note that it is unusual to use this method. Consider using DbContext in the normal way instead.

CreateConventionSet()

Builds and returns the convention set for the current database provider.

public override ConventionSet CreateConventionSet()

Returns

ConventionSet

The convention set for the current database provider.

CreateModelBuilder()

Call this method to build a ModelBuilder for SQLite outside of OnModelCreating(ModelBuilder).

public static ModelBuilder CreateModelBuilder()

Returns

ModelBuilder

The convention set.

Remarks

Note that it is unusual to use this method. Consider using DbContext in the normal way instead.