Compartir a través de


ModelSource.GetModel Método

Definición

Sobrecargas

GetModel(DbContext, IConventionSetBuilder)
Obsoletos.
Obsoletos.

Devuelve el modelo de la memoria caché o crea un modelo si no está presente en la memoria caché.

GetModel(DbContext, IConventionSetBuilder, ModelDependencies)
Obsoletos.

Devuelve el modelo de la memoria caché o crea un modelo si no está presente en la memoria caché.

GetModel(DbContext, IConventionSetBuilder, IModelValidator)

Devuelve el modelo de la memoria caché o crea un modelo si no está presente en la memoria caché.

GetModel(DbContext, IConventionSetBuilder, IModelValidator)

Devuelve el modelo de la memoria caché o crea un modelo si no está presente en la memoria caché.

GetModel(DbContext, ModelCreationDependencies, Boolean)

Obtiene el modelo que se va a usar.

GetModel(DbContext, IConventionSetBuilder)

Source:
ModelSource.cs
Source:
ModelSource.cs
Source:
ModelSource.cs
Source:
ModelSource.cs

Precaución

Use the overload with ModelDependencies

Precaución

Use the overload with ModelCreationDependencies

Devuelve el modelo de la memoria caché o crea un modelo si no está presente en la memoria caché.

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

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.

Implementaciones

Atributos

Se aplica a

GetModel(DbContext, IConventionSetBuilder, ModelDependencies)

Source:
ModelSource.cs
Source:
ModelSource.cs

Precaución

Use the overload with ModelCreationDependencies

Devuelve el modelo de la memoria caché o crea un modelo si no está presente en la memoria caché.

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

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.

Implementaciones

Atributos

Se aplica a

GetModel(DbContext, IConventionSetBuilder, IModelValidator)

Source:
ModelSource.cs
Source:
ModelSource.cs

Devuelve el modelo de la memoria caché o crea un modelo si no está presente en la memoria caché.

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

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.

Implementaciones

Se aplica a

GetModel(DbContext, IConventionSetBuilder, IModelValidator)

Devuelve el modelo de la memoria caché o crea un modelo si no está presente en la memoria caché.

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

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.

Implementaciones

Se aplica a

GetModel(DbContext, ModelCreationDependencies, Boolean)

Source:
ModelSource.cs
Source:
ModelSource.cs
Source:
ModelSource.cs
Source:
ModelSource.cs

Obtiene el modelo que se va a usar.

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

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.

Implementaciones

Se aplica a