IConventionEntityType.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(MemberInfo, Type, Boolean) |
Ajoute une propriété de service à ce type d’entité. |
AddServiceProperty(MemberInfo, Boolean) |
Ajoute une propriété de service à ce type d’entité. |
AddServiceProperty(MemberInfo, Type, Boolean)
Ajoute une propriété de service à ce type d’entité.
public Microsoft.EntityFrameworkCore.Metadata.IConventionServiceProperty AddServiceProperty (System.Reflection.MemberInfo memberInfo, Type? serviceType = default, bool fromDataAnnotation = false);
abstract member AddServiceProperty : System.Reflection.MemberInfo * Type * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionServiceProperty
Public Function AddServiceProperty (memberInfo As MemberInfo, Optional serviceType As Type = Nothing, Optional fromDataAnnotation As Boolean = false) As IConventionServiceProperty
Paramètres
- memberInfo
- MemberInfo
PropertyInfo ou FieldInfo de la propriété à ajouter.
- serviceType
- Type
Type du service, ou null
pour utiliser le type du membre.
- fromDataAnnotation
- Boolean
Indique si la configuration a été spécifiée à l’aide d’une annotation de données.
Retours
Propriété de service nouvellement créée.
S’applique à
AddServiceProperty(MemberInfo, Boolean)
Ajoute une propriété de service à ce type d’entité.
public Microsoft.EntityFrameworkCore.Metadata.IConventionServiceProperty AddServiceProperty (System.Reflection.MemberInfo memberInfo, bool fromDataAnnotation = false);
abstract member AddServiceProperty : System.Reflection.MemberInfo * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionServiceProperty
Public Function AddServiceProperty (memberInfo As MemberInfo, Optional fromDataAnnotation As Boolean = false) As IConventionServiceProperty
Paramètres
- memberInfo
- MemberInfo
PropertyInfo ou FieldInfo de la propriété à ajouter.
- fromDataAnnotation
- Boolean
Indique si la configuration a été spécifiée à l’aide d’une annotation de données.
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