Udostępnij za pośrednictwem


IModelSource.GetModel Metoda

Definicja

Przeciążenia

GetModel(DbContext, IConventionSetBuilder)
Przestarzałe.
Przestarzałe.

Pobiera model do użycia.

GetModel(DbContext, IConventionSetBuilder, ModelDependencies)
Przestarzałe.

Pobiera model do użycia.

GetModel(DbContext, IConventionSetBuilder, IModelValidator)

Pobiera model do użycia.

GetModel(DbContext, IConventionSetBuilder, IModelValidator)

Pobiera model do użycia.

GetModel(DbContext, ModelCreationDependencies, Boolean)

Pobiera model do użycia.

GetModel(DbContext, IConventionSetBuilder)

Przestroga

Use the overload with ModelDependencies

Przestroga

Use the overload with ModelCreationDependencies

Pobiera model do użycia.

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

Parametry

context
DbContext

Kontekst, dla który jest tworzony model.

conventionSetBuilder
IConventionSetBuilder

Konwencja ustawiona do użycia podczas tworzenia modelu.

Zwraca

Model do użycia.

Atrybuty

Dotyczy

GetModel(DbContext, IConventionSetBuilder, ModelDependencies)

Przestroga

Use the overload with ModelCreationDependencies

Pobiera model do użycia.

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

Parametry

context
DbContext

Kontekst, dla który jest tworzony model.

conventionSetBuilder
IConventionSetBuilder

Konwencja ustawiona do użycia podczas tworzenia modelu.

modelDependencies
ModelDependencies

Obiekt zależności dla modelu.

Zwraca

Model do użycia.

Atrybuty

Dotyczy

GetModel(DbContext, IConventionSetBuilder, IModelValidator)

Pobiera model do użycia.

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

Parametry

context
DbContext

Kontekst, dla który jest tworzony model.

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

Konwencja ustawiona do użycia podczas tworzenia modelu.

validator
IModelValidator

Moduł sprawdzania poprawności do weryfikacji modelu może być pomyślnie używany z kontekstem.

Zwraca

Model do użycia.

Dotyczy

GetModel(DbContext, IConventionSetBuilder, IModelValidator)

Pobiera model do użycia.

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

Parametry

context
DbContext

Kontekst, dla który jest tworzony model.

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

Konwencja ustawiona do użycia podczas tworzenia modelu.

validator
Microsoft.EntityFrameworkCore.Internal.IModelValidator

Moduł sprawdzania poprawności do weryfikacji modelu może być pomyślnie używany z kontekstem.

Zwraca

Model do użycia.

Dotyczy

GetModel(DbContext, ModelCreationDependencies, Boolean)

Źródło:
IModelSource.cs
Źródło:
IModelSource.cs
Źródło:
IModelSource.cs

Pobiera model do użycia.

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

Parametry

context
DbContext

Kontekst, dla który jest tworzony model.

modelCreationDependencies
ModelCreationDependencies

Obiekt zależności używany podczas tworzenia modelu.

designTime
Boolean

Określa, czy model powinien zawierać konfigurację czasu projektowania.

Zwraca

Model do użycia.

Dotyczy