IMutableModel.AddEntityType Metoda
Definice
Důležité
Některé informace platí pro předběžně vydaný produkt, který se může zásadně změnit, než ho výrobce nebo autor vydá. Microsoft neposkytuje žádné záruky, výslovné ani předpokládané, týkající se zde uváděných informací.
Přetížení
AddEntityType(String) |
Přidá do modelu typ entity výchozího typu. |
AddEntityType(String, Type) |
Přidá do modelu typ entity sdíleného typu. |
AddEntityType(Type) |
Přidá do modelu typ entity. |
AddEntityType(String, String, IMutableEntityType) |
Přidá vlastněný typ entity s definující navigaci do modelu. |
AddEntityType(Type, String, IMutableEntityType) |
Přidá vlastněný typ entity s definující navigaci do modelu. |
AddEntityType(String)
Přidá do modelu typ entity výchozího typu.
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
Název entity, která se má přidat.
Návraty
Nový typ entity.
Poznámky
Stínové entity se v současné době nepodporují v modelu, který se používá za běhu s DbContext. Proto budou typy entit stínového stavu existovat pouze ve snímcích modelů migrace atd.
Platí pro
AddEntityType(String, Type)
Přidá do modelu typ entity sdíleného typu.
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
Název entity, která se má přidat.
- type
- Type
Třída CLR, která se používá k reprezentaci instancí typu entity.
Návraty
Nový typ entity.
Poznámky
Typ entity sdíleného typu je typ entity, která může sdílet typ CLR s jinými typy v modelu, ale má jedinečný název a je vždy identifikovaný názvem.
Platí pro
AddEntityType(Type)
Přidá do modelu typ entity.
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
Třída CLR, která se používá k reprezentaci instancí typu entity.
Návraty
Nový typ entity.
Platí pro
AddEntityType(String, String, IMutableEntityType)
Přidá vlastněný typ entity s definující navigaci 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
Název typu entity, který se má přidat.
- definingNavigationName
- String
Definující navigace.
- definingEntityType
- IMutableEntityType
Definující typ entity.
Návraty
Nový typ entity.
Platí pro
AddEntityType(Type, String, IMutableEntityType)
Přidá vlastněný typ entity s definující navigaci 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
Třída CLR, která se používá k reprezentaci instancí tohoto typu entity.
- definingNavigationName
- String
Definující navigace.
- definingEntityType
- IMutableEntityType
Definující typ entity.
Návraty
Nový typ entity.
Platí pro
Entity Framework
Váš názor
https://aka.ms/ContentUserFeedback.
Připravujeme: V průběhu roku 2024 budeme postupně vyřazovat problémy z GitHub coby mechanismus zpětné vazby pro obsah a nahrazovat ho novým systémem zpětné vazby. Další informace naleznete v tématu:Odeslat a zobrazit názory pro