Compartir a través de


ModelSource.CreateModel Método

Definición

Sobrecargas

CreateModel(DbContext, IConventionSetBuilder)
Obsoletos.
Obsoletos.

Crea el modelo. Se llama a este método cuando no se encontró el modelo en la memoria caché.

CreateModel(DbContext, IConventionSetBuilder, ModelDependencies)

Crea el modelo. Se llama a este método cuando no se encontró el modelo en la memoria caché.

CreateModel(DbContext, IConventionSetBuilder, IModelValidator)

Crea el modelo. Se llama a este método cuando no se encontró el modelo en la memoria caché.

CreateModel(DbContext, IConventionSetBuilder, IModelValidator)

Crea el modelo. Se llama a este método cuando no se encontró el modelo en la memoria caché.

CreateModel(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

Crea el modelo. Se llama a este método cuando no se encontró el modelo en la memoria caché.

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

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

CreateModel(DbContext, IConventionSetBuilder, ModelDependencies)

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

Crea el modelo. Se llama a este método cuando no se encontró el modelo en la memoria caché.

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

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.

Se aplica a

CreateModel(DbContext, IConventionSetBuilder, IModelValidator)

Source:
ModelSource.cs
Source:
ModelSource.cs

Crea el modelo. Se llama a este método cuando no se encontró el modelo en la memoria caché.

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

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

CreateModel(DbContext, IConventionSetBuilder, IModelValidator)

Crea el modelo. Se llama a este método cuando no se encontró el modelo en la memoria caché.

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

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