ModelBuilder Constructors
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.
ModelBuilder() |
Initializes a new instance of the ModelBuilder class with no conventions. Warning: conventions are needed to build a correct model. |
ModelBuilder(ConventionSet) |
Initializes a new instance of the ModelBuilder class that will apply a set of conventions. |
ModelBuilder(IMutableModel) |
Obsolete.
This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release. |
ModelBuilder(ConventionSet, ModelDependencies) |
Initializes a new instance of the ModelBuilder class that will apply a set of conventions. |
ModelBuilder(ConventionSet, ModelDependencies, ModelConfiguration) |
This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release. |
- Source:
- ModelBuilder.cs
- Source:
- ModelBuilder.cs
- Source:
- ModelBuilder.cs
- Source:
- ModelBuilder.cs
- Source:
- ModelBuilder.cs
Initializes a new instance of the ModelBuilder class with no conventions.
Warning: conventions are needed to build a correct model.
public ModelBuilder ();
Public Sub New ()
Remarks
See Modeling entity types and relationships and EF Core model-building conventions for more information and examples.
Applies to
Entity Framework Core 9.0 и други версии
Продукт | Версии |
---|---|
Entity Framework Core | 5.0, 6.0, 7.0, 8.0, 9.0 |
- Source:
- ModelBuilder.cs
- Source:
- ModelBuilder.cs
- Source:
- ModelBuilder.cs
- Source:
- ModelBuilder.cs
- Source:
- ModelBuilder.cs
- Source:
- ModelBuilder.cs
- Source:
- ModelBuilder.cs
- Source:
- ModelBuilder.cs
- Source:
- ModelBuilder.cs
Initializes a new instance of the ModelBuilder class that will apply a set of conventions.
public ModelBuilder (Microsoft.EntityFrameworkCore.Metadata.Conventions.ConventionSet conventions);
new Microsoft.EntityFrameworkCore.ModelBuilder : Microsoft.EntityFrameworkCore.Metadata.Conventions.ConventionSet -> Microsoft.EntityFrameworkCore.ModelBuilder
Public Sub New (conventions As ConventionSet)
Parameters
- conventions
- ConventionSet
The conventions to be applied to the model.
Remarks
See Modeling entity types and relationships and EF Core model-building conventions for more information and examples.
Applies to
Entity Framework Core 9.0 и други версии
Продукт | Версии |
---|---|
Entity Framework Core | 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0 |
- Source:
- ModelBuilder.cs
- Source:
- ModelBuilder.cs
- Source:
- ModelBuilder.cs
- Source:
- ModelBuilder.cs
- Source:
- ModelBuilder.cs
- Source:
- ModelBuilder.cs
- Source:
- ModelBuilder.cs
Caution
This API is now deprecated.
This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.
[Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkInternal]
public ModelBuilder (Microsoft.EntityFrameworkCore.Metadata.IMutableModel model);
[Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkInternal]
[System.Obsolete]
public ModelBuilder (Microsoft.EntityFrameworkCore.Metadata.IMutableModel model);
[<Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkInternal>]
new Microsoft.EntityFrameworkCore.ModelBuilder : Microsoft.EntityFrameworkCore.Metadata.IMutableModel -> Microsoft.EntityFrameworkCore.ModelBuilder
[<Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkInternal>]
[<System.Obsolete>]
new Microsoft.EntityFrameworkCore.ModelBuilder : Microsoft.EntityFrameworkCore.Metadata.IMutableModel -> Microsoft.EntityFrameworkCore.ModelBuilder
Public Sub New (model As IMutableModel)
Parameters
- model
- IMutableModel
- Attributes
Applies to
Entity Framework Core 9.0 и други версии
Продукт | Версии (остаряло) |
---|---|
Entity Framework Core | 3.0, 3.1, 7.0, 8.0, 9.0 (5.0, 6.0) |
- Source:
- ModelBuilder.cs
- Source:
- ModelBuilder.cs
- Source:
- ModelBuilder.cs
- Source:
- ModelBuilder.cs
- Source:
- ModelBuilder.cs
Initializes a new instance of the ModelBuilder class that will apply a set of conventions.
public ModelBuilder (Microsoft.EntityFrameworkCore.Metadata.Conventions.ConventionSet conventions, Microsoft.EntityFrameworkCore.Infrastructure.ModelDependencies modelDependencies);
new Microsoft.EntityFrameworkCore.ModelBuilder : Microsoft.EntityFrameworkCore.Metadata.Conventions.ConventionSet * Microsoft.EntityFrameworkCore.Infrastructure.ModelDependencies -> Microsoft.EntityFrameworkCore.ModelBuilder
Public Sub New (conventions As ConventionSet, modelDependencies As ModelDependencies)
Parameters
- conventions
- ConventionSet
The conventions to be applied to the model.
- modelDependencies
- ModelDependencies
The dependencies object for the model.
Remarks
See Modeling entity types and relationships and EF Core model-building conventions for more information and examples.
Applies to
Entity Framework Core 9.0 и други версии
Продукт | Версии |
---|---|
Entity Framework Core | 5.0, 6.0, 7.0, 8.0, 9.0 |
- Source:
- ModelBuilder.cs
- Source:
- ModelBuilder.cs
- Source:
- ModelBuilder.cs
- Source:
- ModelBuilder.cs
This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.
[Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkInternal]
public ModelBuilder (Microsoft.EntityFrameworkCore.Metadata.Conventions.ConventionSet conventions, Microsoft.EntityFrameworkCore.Infrastructure.ModelDependencies? modelDependencies, Microsoft.EntityFrameworkCore.Metadata.Internal.ModelConfiguration? modelConfiguration);
[<Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkInternal>]
new Microsoft.EntityFrameworkCore.ModelBuilder : Microsoft.EntityFrameworkCore.Metadata.Conventions.ConventionSet * Microsoft.EntityFrameworkCore.Infrastructure.ModelDependencies * Microsoft.EntityFrameworkCore.Metadata.Internal.ModelConfiguration -> Microsoft.EntityFrameworkCore.ModelBuilder
Public Sub New (conventions As ConventionSet, modelDependencies As ModelDependencies, modelConfiguration As ModelConfiguration)
Parameters
- conventions
- ConventionSet
- modelDependencies
- ModelDependencies
- modelConfiguration
- Microsoft.EntityFrameworkCore.Metadata.Internal.ModelConfiguration
- Attributes
Applies to
Entity Framework Core 9.0 и други версии
Продукт | Версии |
---|---|
Entity Framework Core | 6.0, 7.0, 8.0, 9.0 |
Обратна връзка за Entity Framework
Entity Framework е проект с отворен код. Изберете връзка, за да предоставите обратна връзка: