IModelSource.GetModel Método

Definição

Sobrecargas

GetModel(DbContext, IConventionSetBuilder)
Obsoleto.
Obsoleto.

Obtém o modelo a ser usado.

GetModel(DbContext, IConventionSetBuilder, ModelDependencies)
Obsoleto.

Obtém o modelo a ser usado.

GetModel(DbContext, IConventionSetBuilder, IModelValidator)

Obtém o modelo a ser usado.

GetModel(DbContext, IConventionSetBuilder, IModelValidator)

Obtém o modelo a ser usado.

GetModel(DbContext, ModelCreationDependencies, Boolean)

Obtém o modelo a ser usado.

GetModel(DbContext, IConventionSetBuilder)

Cuidado

Use the overload with ModelDependencies

Cuidado

Use the overload with ModelCreationDependencies

Obtém o modelo a ser usado.

public Microsoft.EntityFrameworkCore.Metadata.IModel GetModel (Microsoft.EntityFrameworkCore.DbContext context, Microsoft.EntityFrameworkCore.Metadata.Conventions.Infrastructure.IConventionSetBuilder conventionSetBuilder);
[System.Obsolete("Use the overload with ModelDependencies")]
public Microsoft.EntityFrameworkCore.Metadata.IModel GetModel (Microsoft.EntityFrameworkCore.DbContext context, Microsoft.EntityFrameworkCore.Metadata.Conventions.Infrastructure.IConventionSetBuilder conventionSetBuilder);
[System.Obsolete("Use the overload with ModelCreationDependencies")]
public Microsoft.EntityFrameworkCore.Metadata.IModel GetModel (Microsoft.EntityFrameworkCore.DbContext context, Microsoft.EntityFrameworkCore.Metadata.Conventions.Infrastructure.IConventionSetBuilder conventionSetBuilder);
abstract member GetModel : Microsoft.EntityFrameworkCore.DbContext * Microsoft.EntityFrameworkCore.Metadata.Conventions.Infrastructure.IConventionSetBuilder -> Microsoft.EntityFrameworkCore.Metadata.IModel
[<System.Obsolete("Use the overload with ModelDependencies")>]
abstract member GetModel : Microsoft.EntityFrameworkCore.DbContext * Microsoft.EntityFrameworkCore.Metadata.Conventions.Infrastructure.IConventionSetBuilder -> Microsoft.EntityFrameworkCore.Metadata.IModel
[<System.Obsolete("Use the overload with ModelCreationDependencies")>]
abstract member GetModel : Microsoft.EntityFrameworkCore.DbContext * Microsoft.EntityFrameworkCore.Metadata.Conventions.Infrastructure.IConventionSetBuilder -> Microsoft.EntityFrameworkCore.Metadata.IModel
Public Function GetModel (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

GetModel(DbContext, IConventionSetBuilder, ModelDependencies)

Cuidado

Use the overload with ModelCreationDependencies

Obtém o modelo a ser usado.

public Microsoft.EntityFrameworkCore.Metadata.IModel GetModel (Microsoft.EntityFrameworkCore.DbContext context, Microsoft.EntityFrameworkCore.Metadata.Conventions.Infrastructure.IConventionSetBuilder conventionSetBuilder, Microsoft.EntityFrameworkCore.Infrastructure.ModelDependencies modelDependencies);
[System.Obsolete("Use the overload with ModelCreationDependencies")]
public Microsoft.EntityFrameworkCore.Metadata.IModel GetModel (Microsoft.EntityFrameworkCore.DbContext context, Microsoft.EntityFrameworkCore.Metadata.Conventions.Infrastructure.IConventionSetBuilder conventionSetBuilder, Microsoft.EntityFrameworkCore.Infrastructure.ModelDependencies modelDependencies);
abstract member GetModel : Microsoft.EntityFrameworkCore.DbContext * Microsoft.EntityFrameworkCore.Metadata.Conventions.Infrastructure.IConventionSetBuilder * Microsoft.EntityFrameworkCore.Infrastructure.ModelDependencies -> Microsoft.EntityFrameworkCore.Metadata.IModel
[<System.Obsolete("Use the overload with ModelCreationDependencies")>]
abstract member GetModel : Microsoft.EntityFrameworkCore.DbContext * Microsoft.EntityFrameworkCore.Metadata.Conventions.Infrastructure.IConventionSetBuilder * Microsoft.EntityFrameworkCore.Infrastructure.ModelDependencies -> Microsoft.EntityFrameworkCore.Metadata.IModel
Public Function GetModel (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.

Atributos

Aplica-se a

GetModel(DbContext, IConventionSetBuilder, IModelValidator)

Obtém o modelo a ser usado.

public Microsoft.EntityFrameworkCore.Metadata.IModel GetModel (Microsoft.EntityFrameworkCore.DbContext context, Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.IConventionSetBuilder conventionSetBuilder, Microsoft.EntityFrameworkCore.Infrastructure.IModelValidator validator);
abstract member GetModel : Microsoft.EntityFrameworkCore.DbContext * Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.IConventionSetBuilder * Microsoft.EntityFrameworkCore.Infrastructure.IModelValidator -> Microsoft.EntityFrameworkCore.Metadata.IModel
Public Function GetModel (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

GetModel(DbContext, IConventionSetBuilder, IModelValidator)

Obtém o modelo a ser usado.

public Microsoft.EntityFrameworkCore.Metadata.IModel GetModel (Microsoft.EntityFrameworkCore.DbContext context, Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.IConventionSetBuilder conventionSetBuilder, Microsoft.EntityFrameworkCore.Internal.IModelValidator validator);
abstract member GetModel : Microsoft.EntityFrameworkCore.DbContext * Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.IConventionSetBuilder * Microsoft.EntityFrameworkCore.Internal.IModelValidator -> Microsoft.EntityFrameworkCore.Metadata.IModel
Public Function GetModel (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

GetModel(DbContext, ModelCreationDependencies, Boolean)

Obtém o modelo a ser usado.

public Microsoft.EntityFrameworkCore.Metadata.IModel GetModel (Microsoft.EntityFrameworkCore.DbContext context, Microsoft.EntityFrameworkCore.ModelCreationDependencies modelCreationDependencies, bool designTime);
abstract member GetModel : Microsoft.EntityFrameworkCore.DbContext * Microsoft.EntityFrameworkCore.ModelCreationDependencies * bool -> Microsoft.EntityFrameworkCore.Metadata.IModel
Public Function GetModel (context As DbContext, modelCreationDependencies As ModelCreationDependencies, designTime As Boolean) As IModel

Parâmetros

context
DbContext

O contexto para o qual o modelo está sendo produzido.

modelCreationDependencies
ModelCreationDependencies

O objeto de dependências usado durante a criação do modelo.

designTime
Boolean

Se o modelo deve conter a configuração de tempo de design.

Retornos

O modelo a ser usado.

Aplica-se a