Sdílet prostřednictvím


MutableModelExtensions.GetOrAddEntityType Metoda

Definice

Přetížení

GetOrAddEntityType(IMutableModel, String)

Získá typ entity se zadaným názvem nebo přidá nový typ entity, pokud není nalezen žádný.

GetOrAddEntityType(IMutableModel, Type)

Získá typ entity s danou třídou CLR nebo přidá nový typ entity, pokud není nalezen žádný.

GetOrAddEntityType(IMutableModel, String)

Získá typ entity se zadaným názvem nebo přidá nový typ entity, pokud není nalezen žádný.

public static Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType GetOrAddEntityType (this Microsoft.EntityFrameworkCore.Metadata.IMutableModel model, string name);
static member GetOrAddEntityType : Microsoft.EntityFrameworkCore.Metadata.IMutableModel * string -> Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType
<Extension()>
Public Function GetOrAddEntityType (model As IMutableModel, name As String) As IMutableEntityType

Parametry

model
IMutableModel

Model, do který chcete najít nebo přidat typ entity.

name
String

Název typu entity.

Návraty

Existující nebo nově vytvořený typ entity.

Platí pro

GetOrAddEntityType(IMutableModel, Type)

Získá typ entity s danou třídou CLR nebo přidá nový typ entity, pokud není nalezen žádný.

public static Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType GetOrAddEntityType (this Microsoft.EntityFrameworkCore.Metadata.IMutableModel model, Type type);
static member GetOrAddEntityType : Microsoft.EntityFrameworkCore.Metadata.IMutableModel * Type -> Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType
<Extension()>
Public Function GetOrAddEntityType (model As IMutableModel, type As Type) As IMutableEntityType

Parametry

model
IMutableModel

Model, do který chcete najít nebo přidat typ entity.

type
Type

Třída CLR typu entity.

Návraty

Existující nebo nově vytvořený typ entity.

Platí pro