ConventionsConfiguration.Add Method
Definition
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.
Overloads
Add(IConvention[]) |
Enables one or more conventions for the DbModelBuilder. |
Add<TConvention>() |
Enables a convention for the DbModelBuilder. |
Add(IConvention[])
Enables one or more conventions for the 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())
Parameters
- conventions
- IConvention[]
The conventions to be enabled.
Applies to
Add<TConvention>()
Enables a convention for the 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}) ()
Type Parameters
- TConvention
The type of the convention to be enabled.
- Attributes
Applies to
Samarbeta med oss på GitHub
Källan för det här innehållet finns på GitHub, där du även kan skapa och granska ärenden och pull-begäranden. Se vår deltagarguide för mer information.
Entity Framework