共用方式為


ConventionsConfiguration.AddBefore<TExistingConvention> 方法

定義

啟用 的 DbModelBuilder 組態慣例。 此慣例會在指定的慣例之前執行。

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1004:GenericMethodsShouldProvideTypeParameter")]
public void AddBefore<TExistingConvention> (System.Data.Entity.ModelConfiguration.Conventions.IConvention newConvention) where TExistingConvention : System.Data.Entity.ModelConfiguration.Conventions.IConvention;
member this.AddBefore : System.Data.Entity.ModelConfiguration.Conventions.IConvention -> unit (requires 'ExistingConvention :> System.Data.Entity.ModelConfiguration.Conventions.IConvention)
Public Sub AddBefore(Of TExistingConvention As IConvention) (newConvention As IConvention)

類型參數

TExistingConvention

啟用慣例之前執行慣例的類型。

參數

newConvention
IConvention

要啟用的慣例。

屬性

適用於