Compartir a través de


IModelSource.GetModel Método

Definición

Sobrecargas

GetModel(DbContext, IConventionSetBuilder)
Obsoletos.
Obsoletos.

Obtiene el modelo que se va a usar.

GetModel(DbContext, IConventionSetBuilder, ModelDependencies)
Obsoletos.

Obtiene el modelo que se va a usar.

GetModel(DbContext, IConventionSetBuilder, IModelValidator)

Obtiene el modelo que se va a usar.

GetModel(DbContext, IConventionSetBuilder, IModelValidator)

Obtiene el modelo que se va a usar.

GetModel(DbContext, ModelCreationDependencies, Boolean)

Obtiene el modelo que se va a usar.

GetModel(DbContext, IConventionSetBuilder)

Precaución

Use the overload with ModelDependencies

Precaución

Use the overload with ModelCreationDependencies

Obtiene el modelo que se va a usar.

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

Contexto para el que se está generando el modelo.

conventionSetBuilder
IConventionSetBuilder

Convención establecida para usar al crear el modelo.

Devoluciones

Modelo que se va a usar.

Atributos

Se aplica a

GetModel(DbContext, IConventionSetBuilder, ModelDependencies)

Precaución

Use the overload with ModelCreationDependencies

Obtiene el modelo que se va a usar.

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

Contexto para el que se está generando el modelo.

conventionSetBuilder
IConventionSetBuilder

Convención establecida para usar al crear el modelo.

modelDependencies
ModelDependencies

Objeto de dependencias del modelo.

Devoluciones

Modelo que se va a usar.

Atributos

Se aplica a

GetModel(DbContext, IConventionSetBuilder, IModelValidator)

Obtiene el modelo que se va a usar.

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

Contexto para el que se está generando el modelo.

conventionSetBuilder
Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.IConventionSetBuilder

Convención establecida para usar al crear el modelo.

validator
IModelValidator

El validador para comprobar que el modelo se puede usar correctamente con el contexto.

Devoluciones

Modelo que se va a usar.

Se aplica a

GetModel(DbContext, IConventionSetBuilder, IModelValidator)

Obtiene el modelo que se va a usar.

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

Contexto para el que se está generando el modelo.

conventionSetBuilder
Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.IConventionSetBuilder

Convención establecida para usar al crear el modelo.

validator
Microsoft.EntityFrameworkCore.Internal.IModelValidator

El validador para comprobar que el modelo se puede usar correctamente con el contexto.

Devoluciones

Modelo que se va a usar.

Se aplica a

GetModel(DbContext, ModelCreationDependencies, Boolean)

Source:
IModelSource.cs
Source:
IModelSource.cs
Source:
IModelSource.cs

Obtiene el modelo que se va a usar.

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

Contexto para el que se está generando el modelo.

modelCreationDependencies
ModelCreationDependencies

Objeto de dependencias utilizado durante la creación del modelo.

designTime
Boolean

Si el modelo debe contener la configuración en tiempo de diseño.

Devoluciones

Modelo que se va a usar.

Se aplica a