IMutableModel.AddEntityType Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Overload
AddEntityType(String) |
Aggiunge un tipo di entità di tipo predefinito al modello. |
AddEntityType(String, Type) |
Aggiunge un tipo di entità di tipo condiviso al modello. |
AddEntityType(Type) |
Aggiunge un tipo di entità al modello. |
AddEntityType(String, String, IMutableEntityType) |
Aggiunge un tipo di entità di proprietà con una struttura di spostamento che definisce il modello. |
AddEntityType(Type, String, IMutableEntityType) |
Aggiunge un tipo di entità di proprietà con una struttura di spostamento che definisce il modello. |
AddEntityType(String)
Aggiunge un tipo di entità di tipo predefinito al modello.
public Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType AddEntityType (string name);
abstract member AddEntityType : string -> Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType
Public Function AddEntityType (name As String) As IMutableEntityType
Parametri
- name
- String
Nome dell'entità da aggiungere.
Restituisce
Nuovo tipo di entità.
Commenti
Le entità shadow non sono attualmente supportate in un modello usato in fase di esecuzione con .DbContext Pertanto, i tipi di entità dello stato shadow esistono solo negli snapshot del modello di migrazione e così via.
Si applica a
AddEntityType(String, Type)
Aggiunge un tipo di entità di tipo condiviso al modello.
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
Parametri
- name
- String
Nome dell'entità da aggiungere.
- type
- Type
Classe CLR utilizzata per rappresentare le istanze del tipo di entità.
Restituisce
Nuovo tipo di entità.
Commenti
Il tipo di entità tipo condiviso è un tipo di entità che può condividere il tipo CLR con altri tipi nel modello, ma ha un nome univoco e sempre identificato dal nome.
Si applica a
AddEntityType(Type)
Aggiunge un tipo di entità al modello.
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
Parametri
- clrTypetype
- Type
Classe CLR utilizzata per rappresentare le istanze del tipo di entità.
Restituisce
Nuovo tipo di entità.
Si applica a
AddEntityType(String, String, IMutableEntityType)
Aggiunge un tipo di entità di proprietà con una struttura di spostamento che definisce il modello.
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
Parametri
- name
- String
Nome del tipo di entità da aggiungere.
- definingNavigationName
- String
Struttura che definisce lo spostamento.
- definingEntityType
- IMutableEntityType
Tipo di entità che definisce.
Restituisce
Nuovo tipo di entità.
Si applica a
AddEntityType(Type, String, IMutableEntityType)
Aggiunge un tipo di entità di proprietà con una struttura di spostamento che definisce il modello.
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
Parametri
- clrTypetype
- Type
Classe CLR utilizzata per rappresentare le istanze di questo tipo di entità.
- definingNavigationName
- String
Struttura che definisce lo spostamento.
- definingEntityType
- IMutableEntityType
Tipo di entità che definisce.
Restituisce
Nuovo tipo di entità.
Si applica a
Commenti e suggerimenti
https://aka.ms/ContentUserFeedback.
Presto disponibile: Nel corso del 2024 verranno gradualmente disattivati i problemi di GitHub come meccanismo di feedback per il contenuto e ciò verrà sostituito con un nuovo sistema di feedback. Per altre informazioni, vedereInvia e visualizza il feedback per