ModelSource.CreateModel Metodo

Definizione

Overload

CreateModel(DbContext, IConventionSetBuilder)
Obsoleti.
Obsoleti.

Crea il modello. Questo metodo viene chiamato quando il modello non è stato trovato nella cache.

CreateModel(DbContext, IConventionSetBuilder, ModelDependencies)

Crea il modello. Questo metodo viene chiamato quando il modello non è stato trovato nella cache.

CreateModel(DbContext, IConventionSetBuilder, IModelValidator)

Crea il modello. Questo metodo viene chiamato quando il modello non è stato trovato nella cache.

CreateModel(DbContext, IConventionSetBuilder, IModelValidator)

Crea il modello. Questo metodo viene chiamato quando il modello non è stato trovato nella cache.

CreateModel(DbContext, IConventionSetBuilder)

Attenzione

Use the overload with ModelDependencies

Attenzione

Use the overload with ModelCreationDependencies

Crea il modello. Questo metodo viene chiamato quando il modello non è stato trovato nella cache.

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

Parametri

context
DbContext

Contesto per cui viene prodotto il modello.

conventionSetBuilder
IConventionSetBuilder

Convenzione impostata da utilizzare durante la creazione del modello.

Restituisce

Modello da utilizzare.

Attributi

Si applica a

CreateModel(DbContext, IConventionSetBuilder, ModelDependencies)

Crea il modello. Questo metodo viene chiamato quando il modello non è stato trovato nella cache.

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

Parametri

context
DbContext

Contesto per cui viene prodotto il modello.

conventionSetBuilder
IConventionSetBuilder

Convenzione impostata da utilizzare durante la creazione del modello.

modelDependencies
ModelDependencies

Oggetto dependencies per il modello.

Restituisce

Modello da utilizzare.

Si applica a

CreateModel(DbContext, IConventionSetBuilder, IModelValidator)

Crea il modello. Questo metodo viene chiamato quando il modello non è stato trovato nella cache.

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

Parametri

context
DbContext

Contesto per cui viene prodotto il modello.

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

Convenzione impostata da utilizzare durante la creazione del modello.

validator
IModelValidator

Validator per verificare che il modello possa essere usato correttamente con il contesto.

Restituisce

Modello da utilizzare.

Si applica a

CreateModel(DbContext, IConventionSetBuilder, IModelValidator)

Crea il modello. Questo metodo viene chiamato quando il modello non è stato trovato nella cache.

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

Parametri

context
DbContext

Contesto per cui viene prodotto il modello.

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

Convenzione impostata da utilizzare durante la creazione del modello.

validator
Microsoft.EntityFrameworkCore.Internal.IModelValidator

Validator per verificare che il modello possa essere usato correttamente con il contesto.

Restituisce

Modello da utilizzare.

Si applica a