RuntimeEntityType.AddServiceProperty Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Surcharges
AddServiceProperty(String, PropertyInfo, FieldInfo, PropertyAccessMode) |
Ajoute une propriété de service à ce type d’entité. |
AddServiceProperty(String, PropertyInfo, FieldInfo, Type, PropertyAccessMode) |
Ajoute une propriété de service à ce type d’entité. |
AddServiceProperty(String, PropertyInfo, FieldInfo, PropertyAccessMode)
Ajoute une propriété de service à ce type d’entité.
public virtual Microsoft.EntityFrameworkCore.Metadata.RuntimeServiceProperty AddServiceProperty (string name, System.Reflection.PropertyInfo? propertyInfo = default, System.Reflection.FieldInfo? fieldInfo = default, Microsoft.EntityFrameworkCore.PropertyAccessMode propertyAccessMode = Microsoft.EntityFrameworkCore.PropertyAccessMode.PreferField);
abstract member AddServiceProperty : string * System.Reflection.PropertyInfo * System.Reflection.FieldInfo * Microsoft.EntityFrameworkCore.PropertyAccessMode -> Microsoft.EntityFrameworkCore.Metadata.RuntimeServiceProperty
override this.AddServiceProperty : string * System.Reflection.PropertyInfo * System.Reflection.FieldInfo * Microsoft.EntityFrameworkCore.PropertyAccessMode -> Microsoft.EntityFrameworkCore.Metadata.RuntimeServiceProperty
Public Overridable Function AddServiceProperty (name As String, Optional propertyInfo As PropertyInfo = Nothing, Optional fieldInfo As FieldInfo = Nothing, Optional propertyAccessMode As PropertyAccessMode = Microsoft.EntityFrameworkCore.PropertyAccessMode.PreferField) As RuntimeServiceProperty
Paramètres
- name
- String
Nom de la propriété à ajouter.
- propertyInfo
- PropertyInfo
Propriété CLR correspondante ou null
pour une propriété d’ombre.
- fieldInfo
- FieldInfo
Champ CLR correspondant ou null
pour une propriété d’ombre.
- propertyAccessMode
- PropertyAccessMode
PropertyAccessMode utilisé pour cette propriété.
Retours
Propriété de service nouvellement créée.
S’applique à
AddServiceProperty(String, PropertyInfo, FieldInfo, Type, PropertyAccessMode)
Ajoute une propriété de service à ce type d’entité.
public virtual Microsoft.EntityFrameworkCore.Metadata.RuntimeServiceProperty AddServiceProperty (string name, System.Reflection.PropertyInfo? propertyInfo = default, System.Reflection.FieldInfo? fieldInfo = default, Type? serviceType = default, Microsoft.EntityFrameworkCore.PropertyAccessMode propertyAccessMode = Microsoft.EntityFrameworkCore.PropertyAccessMode.PreferField);
abstract member AddServiceProperty : string * System.Reflection.PropertyInfo * System.Reflection.FieldInfo * Type * Microsoft.EntityFrameworkCore.PropertyAccessMode -> Microsoft.EntityFrameworkCore.Metadata.RuntimeServiceProperty
override this.AddServiceProperty : string * System.Reflection.PropertyInfo * System.Reflection.FieldInfo * Type * Microsoft.EntityFrameworkCore.PropertyAccessMode -> Microsoft.EntityFrameworkCore.Metadata.RuntimeServiceProperty
Public Overridable Function AddServiceProperty (name As String, Optional propertyInfo As PropertyInfo = Nothing, Optional fieldInfo As FieldInfo = Nothing, Optional serviceType As Type = Nothing, Optional propertyAccessMode As PropertyAccessMode = Microsoft.EntityFrameworkCore.PropertyAccessMode.PreferField) As RuntimeServiceProperty
Paramètres
- name
- String
Nom de la propriété à ajouter.
- propertyInfo
- PropertyInfo
Propriété CLR correspondante ou null
pour une propriété d’ombre.
- fieldInfo
- FieldInfo
Champ CLR correspondant ou null
pour une propriété d’ombre.
- serviceType
- Type
Type du service ou null
pour utiliser le type du membre.
- propertyAccessMode
- PropertyAccessMode
PropertyAccessMode utilisé pour cette propriété.
Retours
Propriété de service nouvellement créée.
S’applique à
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de 2024, nous allons supprimer progressivement GitHub Issues comme mécanisme de commentaires pour le contenu et le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultezEnvoyer et afficher des commentaires pour