Table of Contents

Class KEFCoreConventionSetBuilder

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

A builder for building conventions for the KEFCore provider.

public class KEFCoreConventionSetBuilder : ProviderConventionSetBuilder, IProviderConventionSetBuilder
Inheritance
KEFCoreConventionSetBuilder
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 KNet database provider for more information and examples.

Constructors

KEFCoreConventionSetBuilder(ProviderConventionSetBuilderDependencies)

A builder for building conventions for the KEFCore provider.

public KEFCoreConventionSetBuilder(ProviderConventionSetBuilderDependencies dependencies)

Parameters

dependencies ProviderConventionSetBuilderDependencies

The core dependencies for this service.

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 KNet database provider for more information and examples.

Methods

Build()

Call this method to build a ConventionSet for the KEFCore 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 KEFCore 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.