ConventionsConfiguration.Add 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
Add(IConvention[]) |
啟用 的 DbModelBuilder 一或多個慣例。 |
Add<TConvention>() |
啟用 的 DbModelBuilder 慣例。 |
Add(IConvention[])
啟用 的 DbModelBuilder 一或多個慣例。
public void Add (params System.Data.Entity.ModelConfiguration.Conventions.IConvention[] conventions);
member this.Add : System.Data.Entity.ModelConfiguration.Conventions.IConvention[] -> unit
Public Sub Add (ParamArray conventions As IConvention())
參數
- conventions
- IConvention[]
要啟用的慣例。
適用於
Add<TConvention>()
啟用 的 DbModelBuilder 慣例。
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1004:GenericMethodsShouldProvideTypeParameter")]
public void Add<TConvention> () where TConvention : System.Data.Entity.ModelConfiguration.Conventions.IConventionnew();
member this.Add : unit -> unit (requires 'Convention :> System.Data.Entity.ModelConfiguration.Conventions.IConvention and 'Convention : (new : unit -> 'Convention))
Public Sub Add(Of TConvention As {IConventionNew}) ()
類型參數
- TConvention
要啟用的慣例類型。
- 屬性