共用方式為


ConventionSet.Replace 方法

定義

多載

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

以衍生慣例取代現有的慣例。

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

以衍生慣例取代現有的慣例。

Replace<TImplementation>(TImplementation)

以衍生慣例取代現有的慣例。 此外,也會為現有慣例未實作的任何慣例類型註冊新的慣例。

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

以衍生慣例取代現有的慣例。

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

類型參數

TConvention

要取代的慣例類型。

TImplementation

舊慣例的類型。

參數

conventionsList
List<TConvention>

要掃描的現有慣例實例清單。

newConvention
TImplementation

新的慣例。

傳回

true 如果已取代慣例,則為 。

適用於

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

以衍生慣例取代現有的慣例。

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

類型參數

TConvention

要取代的慣例類型。

TImplementation

舊慣例的類型。

參數

conventionsList
IList<TConvention>

要掃描的現有慣例實例清單。

newConvention
TImplementation

新的慣例。

傳回

true 如果已取代慣例,則為 。

適用於

Replace<TImplementation>(TImplementation)

以衍生慣例取代現有的慣例。 此外,也會為現有慣例未實作的任何慣例類型註冊新的慣例。

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)

類型參數

TImplementation

舊慣例的類型。

參數

newConvention
TImplementation

新的慣例。

適用於