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)

Source:
ConventionSet.cs
Source:
ConventionSet.cs
Source:
ConventionSet.cs

Replaces an existing convention with a derived convention.

C#
public static bool Replace<TConvention,TImplementation> (System.Collections.Generic.List<TConvention> conventionsList, TImplementation newConvention) where TImplementation : TConvention;

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

Entity Framework Core 9.0 och andra versioner
Produkt Versioner
Entity Framework Core 7.0, 8.0, 9.0

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

Source:
ConventionSet.cs
Source:
ConventionSet.cs
Source:
ConventionSet.cs
Source:
ConventionSet.cs

Replaces an existing convention with a derived convention.

C#
public static bool Replace<TConvention,TImplementation> (System.Collections.Generic.IList<TConvention> conventionsList, TImplementation newConvention) where TImplementation : TConvention;

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

Entity Framework Core 6.0 och andra versioner
Produkt Versioner
Entity Framework Core 3.0, 3.1, 5.0, 6.0

Replace<TImplementation>(TImplementation)

Source:
ConventionSet.cs
Source:
ConventionSet.cs
Source:
ConventionSet.cs

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

C#
public virtual void Replace<TImplementation> (TImplementation newConvention) where TImplementation : Microsoft.EntityFrameworkCore.Metadata.Conventions.IConvention;

Type Parameters

TImplementation

The type of the old convention.

Parameters

newConvention
TImplementation

The new convention.

Applies to

Entity Framework Core 9.0 och andra versioner
Produkt Versioner
Entity Framework Core 7.0, 8.0, 9.0