Share via


ConventionSetBuilder.Replace<TImplementation> Method

Definition

Replaces an existing convention with a derived convention. Also registers the new convention for any convention types not implemented by the existing convention.

public virtual void Replace<TImplementation> (Func<IServiceProvider,TImplementation> conventionFactory) where TImplementation : Microsoft.EntityFrameworkCore.Metadata.Conventions.IConvention;
abstract member Replace : Func<IServiceProvider, 'Implementation (requires 'Implementation :> Microsoft.EntityFrameworkCore.Metadata.Conventions.IConvention)> -> unit (requires 'Implementation :> Microsoft.EntityFrameworkCore.Metadata.Conventions.IConvention)
override this.Replace : Func<IServiceProvider, 'Implementation (requires 'Implementation :> Microsoft.EntityFrameworkCore.Metadata.Conventions.IConvention)> -> unit (requires 'Implementation :> Microsoft.EntityFrameworkCore.Metadata.Conventions.IConvention)
Public Overridable Sub Replace(Of TImplementation As IConvention) (conventionFactory As Func(Of IServiceProvider, TImplementation))

Type Parameters

TImplementation

The type of the old convention.

Parameters

conventionFactory
Func<IServiceProvider,TImplementation>

The factory that creates the new convention.

Applies to