ModelSource.CreateModel Método
Definição
Importante
Algumas informações se referem a produtos de pré-lançamento que podem ser substancialmente modificados antes do lançamento. A Microsoft não oferece garantias, expressas ou implícitas, das informações aqui fornecidas.
Sobrecargas
CreateModel(DbContext, IConventionSetBuilder) |
Obsoleto.
Obsoleto.
Cria o modelo. Esse método é chamado quando o modelo não foi encontrado no cache. |
CreateModel(DbContext, IConventionSetBuilder, ModelDependencies) |
Cria o modelo. Esse método é chamado quando o modelo não foi encontrado no cache. |
CreateModel(DbContext, IConventionSetBuilder, IModelValidator) |
Cria o modelo. Esse método é chamado quando o modelo não foi encontrado no cache. |
CreateModel(DbContext, IConventionSetBuilder, IModelValidator) |
Cria o modelo. Esse método é chamado quando o modelo não foi encontrado no cache. |
CreateModel(DbContext, IConventionSetBuilder)
Cuidado
Use the overload with ModelDependencies
Cuidado
Use the overload with ModelCreationDependencies
Cria o modelo. Esse método é chamado quando o modelo não foi encontrado no cache.
protected virtual Microsoft.EntityFrameworkCore.Metadata.IModel CreateModel (Microsoft.EntityFrameworkCore.DbContext context, Microsoft.EntityFrameworkCore.Metadata.Conventions.Infrastructure.IConventionSetBuilder conventionSetBuilder);
[System.Obsolete("Use the overload with ModelDependencies")]
protected virtual Microsoft.EntityFrameworkCore.Metadata.IModel CreateModel (Microsoft.EntityFrameworkCore.DbContext context, Microsoft.EntityFrameworkCore.Metadata.Conventions.Infrastructure.IConventionSetBuilder conventionSetBuilder);
[System.Obsolete("Use the overload with ModelCreationDependencies")]
protected virtual Microsoft.EntityFrameworkCore.Metadata.IModel CreateModel (Microsoft.EntityFrameworkCore.DbContext context, Microsoft.EntityFrameworkCore.Metadata.Conventions.Infrastructure.IConventionSetBuilder conventionSetBuilder);
abstract member CreateModel : Microsoft.EntityFrameworkCore.DbContext * Microsoft.EntityFrameworkCore.Metadata.Conventions.Infrastructure.IConventionSetBuilder -> Microsoft.EntityFrameworkCore.Metadata.IModel
override this.CreateModel : Microsoft.EntityFrameworkCore.DbContext * Microsoft.EntityFrameworkCore.Metadata.Conventions.Infrastructure.IConventionSetBuilder -> Microsoft.EntityFrameworkCore.Metadata.IModel
[<System.Obsolete("Use the overload with ModelDependencies")>]
abstract member CreateModel : Microsoft.EntityFrameworkCore.DbContext * Microsoft.EntityFrameworkCore.Metadata.Conventions.Infrastructure.IConventionSetBuilder -> Microsoft.EntityFrameworkCore.Metadata.IModel
override this.CreateModel : Microsoft.EntityFrameworkCore.DbContext * Microsoft.EntityFrameworkCore.Metadata.Conventions.Infrastructure.IConventionSetBuilder -> Microsoft.EntityFrameworkCore.Metadata.IModel
[<System.Obsolete("Use the overload with ModelCreationDependencies")>]
abstract member CreateModel : Microsoft.EntityFrameworkCore.DbContext * Microsoft.EntityFrameworkCore.Metadata.Conventions.Infrastructure.IConventionSetBuilder -> Microsoft.EntityFrameworkCore.Metadata.IModel
override this.CreateModel : Microsoft.EntityFrameworkCore.DbContext * Microsoft.EntityFrameworkCore.Metadata.Conventions.Infrastructure.IConventionSetBuilder -> Microsoft.EntityFrameworkCore.Metadata.IModel
Protected Overridable Function CreateModel (context As DbContext, conventionSetBuilder As IConventionSetBuilder) As IModel
Parâmetros
- context
- DbContext
O contexto para o qual o modelo está sendo produzido.
- conventionSetBuilder
- IConventionSetBuilder
A convenção definida para usar ao criar o modelo.
Retornos
O modelo a ser usado.
- Atributos
Aplica-se a
CreateModel(DbContext, IConventionSetBuilder, ModelDependencies)
Cria o modelo. Esse método é chamado quando o modelo não foi encontrado no cache.
protected virtual Microsoft.EntityFrameworkCore.Metadata.IModel CreateModel (Microsoft.EntityFrameworkCore.DbContext context, Microsoft.EntityFrameworkCore.Metadata.Conventions.Infrastructure.IConventionSetBuilder conventionSetBuilder, Microsoft.EntityFrameworkCore.Infrastructure.ModelDependencies modelDependencies);
abstract member CreateModel : Microsoft.EntityFrameworkCore.DbContext * Microsoft.EntityFrameworkCore.Metadata.Conventions.Infrastructure.IConventionSetBuilder * Microsoft.EntityFrameworkCore.Infrastructure.ModelDependencies -> Microsoft.EntityFrameworkCore.Metadata.IModel
override this.CreateModel : Microsoft.EntityFrameworkCore.DbContext * Microsoft.EntityFrameworkCore.Metadata.Conventions.Infrastructure.IConventionSetBuilder * Microsoft.EntityFrameworkCore.Infrastructure.ModelDependencies -> Microsoft.EntityFrameworkCore.Metadata.IModel
Protected Overridable Function CreateModel (context As DbContext, conventionSetBuilder As IConventionSetBuilder, modelDependencies As ModelDependencies) As IModel
Parâmetros
- context
- DbContext
O contexto para o qual o modelo está sendo produzido.
- conventionSetBuilder
- IConventionSetBuilder
A convenção definida para usar ao criar o modelo.
- modelDependencies
- ModelDependencies
O objeto de dependências do modelo.
Retornos
O modelo a ser usado.
Aplica-se a
CreateModel(DbContext, IConventionSetBuilder, IModelValidator)
Cria o modelo. Esse método é chamado quando o modelo não foi encontrado no cache.
protected virtual Microsoft.EntityFrameworkCore.Metadata.IModel CreateModel (Microsoft.EntityFrameworkCore.DbContext context, Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.IConventionSetBuilder conventionSetBuilder, Microsoft.EntityFrameworkCore.Infrastructure.IModelValidator validator);
abstract member CreateModel : Microsoft.EntityFrameworkCore.DbContext * Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.IConventionSetBuilder * Microsoft.EntityFrameworkCore.Infrastructure.IModelValidator -> Microsoft.EntityFrameworkCore.Metadata.IModel
override this.CreateModel : Microsoft.EntityFrameworkCore.DbContext * Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.IConventionSetBuilder * Microsoft.EntityFrameworkCore.Infrastructure.IModelValidator -> Microsoft.EntityFrameworkCore.Metadata.IModel
Protected Overridable Function CreateModel (context As DbContext, conventionSetBuilder As IConventionSetBuilder, validator As IModelValidator) As IModel
Parâmetros
- context
- DbContext
O contexto para o qual o modelo está sendo produzido.
- conventionSetBuilder
- Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.IConventionSetBuilder
A convenção definida para usar ao criar o modelo.
- validator
- IModelValidator
O validador para verificar se o modelo pode ser usado com êxito com o contexto.
Retornos
O modelo a ser usado.
Aplica-se a
CreateModel(DbContext, IConventionSetBuilder, IModelValidator)
Cria o modelo. Esse método é chamado quando o modelo não foi encontrado no cache.
protected virtual Microsoft.EntityFrameworkCore.Metadata.IModel CreateModel (Microsoft.EntityFrameworkCore.DbContext context, Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.IConventionSetBuilder conventionSetBuilder, Microsoft.EntityFrameworkCore.Internal.IModelValidator validator);
abstract member CreateModel : Microsoft.EntityFrameworkCore.DbContext * Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.IConventionSetBuilder * Microsoft.EntityFrameworkCore.Internal.IModelValidator -> Microsoft.EntityFrameworkCore.Metadata.IModel
override this.CreateModel : Microsoft.EntityFrameworkCore.DbContext * Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.IConventionSetBuilder * Microsoft.EntityFrameworkCore.Internal.IModelValidator -> Microsoft.EntityFrameworkCore.Metadata.IModel
Protected Overridable Function CreateModel (context As DbContext, conventionSetBuilder As IConventionSetBuilder, validator As IModelValidator) As IModel
Parâmetros
- context
- DbContext
O contexto para o qual o modelo está sendo produzido.
- conventionSetBuilder
- Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.IConventionSetBuilder
A convenção definida para usar ao criar o modelo.
- validator
- Microsoft.EntityFrameworkCore.Internal.IModelValidator
O validador para verificar se o modelo pode ser usado com êxito com o contexto.
Retornos
O modelo a ser usado.
Aplica-se a
Entity Framework