Udostępnij za pośrednictwem


IMutableModel.AddEntityType Metoda

Definicja

Przeciążenia

AddEntityType(String)

Dodaje typ jednostki typu domyślnego do modelu.

AddEntityType(String, Type)

Dodaje typ jednostki typu współużytkowanego do modelu.

AddEntityType(Type)

Dodaje typ jednostki do modelu.

AddEntityType(String, String, IMutableEntityType)

Dodaje typ jednostki będącej własnością z definiującą nawigacją do modelu.

AddEntityType(Type, String, IMutableEntityType)

Dodaje typ jednostki będącej własnością z definiującą nawigacją do modelu.

AddEntityType(String)

Dodaje typ jednostki typu domyślnego do modelu.

public Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType AddEntityType (string name);
abstract member AddEntityType : string -> Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType
Public Function AddEntityType (name As String) As IMutableEntityType

Parametry

name
String

Nazwa jednostki do dodania.

Zwraca

Nowy typ jednostki.

Uwagi

Jednostki w tle nie są obecnie obsługiwane w modelu, który jest używany w czasie wykonywania z .DbContext W związku z tym typy jednostek stanu w tle będą istnieć tylko w migawkach modelu migracji itp.

Dotyczy

AddEntityType(String, Type)

Dodaje typ jednostki typu współużytkowanego do modelu.

public Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType AddEntityType (string name, Type type);
abstract member AddEntityType : string * Type -> Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType
Public Function AddEntityType (name As String, type As Type) As IMutableEntityType

Parametry

name
String

Nazwa jednostki do dodania.

type
Type

Klasa CLR używana do reprezentowania wystąpień typu jednostki.

Zwraca

Nowy typ jednostki.

Uwagi

Typ jednostki typu współużytkowanego to typ jednostki, który może współużytkować typ CLR z innymi typami w modelu, ale ma unikatową nazwę i zawsze identyfikowany według nazwy.

Dotyczy

AddEntityType(Type)

Dodaje typ jednostki do modelu.

public Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType AddEntityType (Type clrType);
public Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType AddEntityType (Type type);
abstract member AddEntityType : Type -> Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType
abstract member AddEntityType : Type -> Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType
Public Function AddEntityType (clrType As Type) As IMutableEntityType
Public Function AddEntityType (type As Type) As IMutableEntityType

Parametry

clrTypetype
Type

Klasa CLR używana do reprezentowania wystąpień typu jednostki.

Zwraca

Nowy typ jednostki.

Dotyczy

AddEntityType(String, String, IMutableEntityType)

Dodaje typ jednostki będącej własnością z definiującą nawigacją do modelu.

public Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType AddEntityType (string name, string definingNavigationName, Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType definingEntityType);
abstract member AddEntityType : string * string * Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType -> Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType
Public Function AddEntityType (name As String, definingNavigationName As String, definingEntityType As IMutableEntityType) As IMutableEntityType

Parametry

name
String

Nazwa typu jednostki do dodania.

definingNavigationName
String

Definiowanie nawigacji.

definingEntityType
IMutableEntityType

Definiujący typ jednostki.

Zwraca

Nowy typ jednostki.

Dotyczy

AddEntityType(Type, String, IMutableEntityType)

Dodaje typ jednostki będącej własnością z definiującą nawigacją do modelu.

public Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType AddEntityType (Type clrType, string definingNavigationName, Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType definingEntityType);
public Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType AddEntityType (Type type, string definingNavigationName, Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType definingEntityType);
abstract member AddEntityType : Type * string * Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType -> Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType
abstract member AddEntityType : Type * string * Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType -> Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType
Public Function AddEntityType (clrType As Type, definingNavigationName As String, definingEntityType As IMutableEntityType) As IMutableEntityType
Public Function AddEntityType (type As Type, definingNavigationName As String, definingEntityType As IMutableEntityType) As IMutableEntityType

Parametry

clrTypetype
Type

Klasa CLR używana do reprezentowania wystąpień tego typu jednostki.

definingNavigationName
String

Definiowanie nawigacji.

definingEntityType
IMutableEntityType

Definiujący typ jednostki.

Zwraca

Nowy typ jednostki.

Dotyczy