Share via


ConventionSet.Replace Method

Definition

Overloads

Replace<TConvention,TImplementation>(List<TConvention>, TImplementation)

Replaces an existing convention with a derived convention.

Replace<TConvention,TImplementation>(IList<TConvention>, TImplementation)

Replaces an existing convention with a derived convention.

Replace<TImplementation>(TImplementation)

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

Replace<TConvention,TImplementation>(List<TConvention>, TImplementation)

Replaces an existing convention with a derived convention.

public static bool Replace<TConvention,TImplementation> (System.Collections.Generic.List<TConvention> conventionsList, TImplementation newConvention) where TImplementation : TConvention;
static member Replace : System.Collections.Generic.List<'Convention> * 'Implementation -> bool
Public Shared Function Replace(Of TConvention, TImplementation) (conventionsList As List(Of TConvention), newConvention As TImplementation) As Boolean

Type Parameters

TConvention

The type of convention being replaced.

TImplementation

The type of the old convention.

Parameters

conventionsList
List<TConvention>

The list of existing convention instances to scan.

newConvention
TImplementation

The new convention.

Returns

true if the convention was replaced.

Applies to

Replace<TConvention,TImplementation>(IList<TConvention>, TImplementation)

Replaces an existing convention with a derived convention.

public static bool Replace<TConvention,TImplementation> (System.Collections.Generic.IList<TConvention> conventionsList, TImplementation newConvention) where TImplementation : TConvention;
static member Replace : System.Collections.Generic.IList<'Convention> * 'Implementation -> bool
Public Shared Function Replace(Of TConvention, TImplementation) (conventionsList As IList(Of TConvention), newConvention As TImplementation) As Boolean

Type Parameters

TConvention

The type of convention being replaced.

TImplementation

The type of the old convention.

Parameters

conventionsList
IList<TConvention>

The list of existing convention instances to scan.

newConvention
TImplementation

The new convention.

Returns

true if the convention was replaced.

Applies to

Replace<TImplementation>(TImplementation)

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> (TImplementation newConvention) where TImplementation : Microsoft.EntityFrameworkCore.Metadata.Conventions.IConvention;
abstract member Replace : 'Implementation -> unit (requires 'Implementation :> Microsoft.EntityFrameworkCore.Metadata.Conventions.IConvention)
override this.Replace : 'Implementation -> unit (requires 'Implementation :> Microsoft.EntityFrameworkCore.Metadata.Conventions.IConvention)
Public Overridable Sub Replace(Of TImplementation As IConvention) (newConvention As TImplementation)

Type Parameters

TImplementation

The type of the old convention.

Parameters

newConvention
TImplementation

The new convention.

Applies to