Compartilhar via


ModelSource.GetModel Método

Definição

Sobrecargas

GetModel(DbContext, IConventionSetBuilder)
Obsoleto.
Obsoleto.

Retorna o modelo do cache ou cria um modelo se ele não estiver presente no cache.

GetModel(DbContext, IConventionSetBuilder, ModelDependencies)
Obsoleto.

Retorna o modelo do cache ou cria um modelo se ele não estiver presente no cache.

GetModel(DbContext, IConventionSetBuilder, IModelValidator)

Retorna o modelo do cache ou cria um modelo se ele não estiver presente no cache.

GetModel(DbContext, IConventionSetBuilder, IModelValidator)

Retorna o modelo do cache ou cria um modelo se ele não estiver presente no cache.

GetModel(DbContext, ModelCreationDependencies, Boolean)

Obtém o modelo a ser usado.

GetModel(DbContext, IConventionSetBuilder)

Origem:
ModelSource.cs
Origem:
ModelSource.cs
Origem:
ModelSource.cs
Origem:
ModelSource.cs

Cuidado

Use the overload with ModelDependencies

Cuidado

Use the overload with ModelCreationDependencies

Retorna o modelo do cache ou cria um modelo se ele não estiver presente no cache.

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

Implementações

Atributos

Aplica-se a

GetModel(DbContext, IConventionSetBuilder, ModelDependencies)

Origem:
ModelSource.cs
Origem:
ModelSource.cs

Cuidado

Use the overload with ModelCreationDependencies

Retorna o modelo do cache ou cria um modelo se ele não estiver presente no cache.

public virtual 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 virtual 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
override this.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
override this.GetModel : Microsoft.EntityFrameworkCore.DbContext * Microsoft.EntityFrameworkCore.Metadata.Conventions.Infrastructure.IConventionSetBuilder * Microsoft.EntityFrameworkCore.Infrastructure.ModelDependencies -> Microsoft.EntityFrameworkCore.Metadata.IModel
Public Overridable 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.

Implementações

Atributos

Aplica-se a

GetModel(DbContext, IConventionSetBuilder, IModelValidator)

Origem:
ModelSource.cs
Origem:
ModelSource.cs

Retorna o modelo do cache ou cria um modelo se ele não estiver presente no cache.

public virtual 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
override this.GetModel : Microsoft.EntityFrameworkCore.DbContext * Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.IConventionSetBuilder * Microsoft.EntityFrameworkCore.Infrastructure.IModelValidator -> Microsoft.EntityFrameworkCore.Metadata.IModel
Public Overridable 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.

Implementações

Aplica-se a

GetModel(DbContext, IConventionSetBuilder, IModelValidator)

Retorna o modelo do cache ou cria um modelo se ele não estiver presente no cache.

public virtual 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
override this.GetModel : Microsoft.EntityFrameworkCore.DbContext * Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.IConventionSetBuilder * Microsoft.EntityFrameworkCore.Internal.IModelValidator -> Microsoft.EntityFrameworkCore.Metadata.IModel
Public Overridable 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.

Implementações

Aplica-se a

GetModel(DbContext, ModelCreationDependencies, Boolean)

Origem:
ModelSource.cs
Origem:
ModelSource.cs
Origem:
ModelSource.cs
Origem:
ModelSource.cs

Obtém o modelo a ser usado.

public virtual 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
override this.GetModel : Microsoft.EntityFrameworkCore.DbContext * Microsoft.EntityFrameworkCore.ModelCreationDependencies * bool -> Microsoft.EntityFrameworkCore.Metadata.IModel
Public Overridable 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 configuração de tempo de design.

Retornos

O modelo a ser usado.

Implementações

Aplica-se a