ConventionSet.Replace Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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. |
- Source:
- ConventionSet.cs
- Source:
- ConventionSet.cs
- Source:
- ConventionSet.cs
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
Entity Framework Core 9.0 och andra versioner
Produkt | Versioner |
---|---|
Entity Framework Core | 7.0, 8.0, 9.0 |
- Source:
- ConventionSet.cs
- Source:
- ConventionSet.cs
- Source:
- ConventionSet.cs
- Source:
- ConventionSet.cs
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
Entity Framework Core 6.0 och andra versioner
Produkt | Versioner |
---|---|
Entity Framework Core | 3.0, 3.1, 5.0, 6.0 |
- 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.
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
Entity Framework Core 9.0 och andra versioner
Produkt | Versioner |
---|---|
Entity Framework Core | 7.0, 8.0, 9.0 |
Feedback om Entity Framework
Entity Framework är ett öppen källkod projekt. Välj en länk för att ge feedback: