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
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Entity Framework