DbEntityEntry<TEntity>.Property<TProperty>, méthode (Expression<Func<TEntity, TProperty>>)
[Cette page concerne Entity Framework version 6. La dernière version est disponible sous le nom de package 'Entity Framework' NuGet. Pour plus d'informations sur Entity Framework, consultez msdn.com/data/ef.]
Obtient un objet qui représente une propriété scalaire ou complexe de cette entité.
Espace de noms : System.Data.Entity.Infrastructure
Assembly : EntityFramework (dans EntityFramework.dll)
Syntaxe
'Déclaration
<SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")> _
<SuppressMessageAttribute("Microsoft.Naming", "CA1719:ParameterNamesShouldNotMatchMemberNames", MessageId := "0#", _
Justification := "Rule predates more fluent naming conventions.")> _
Public Function Property(Of TProperty) ( _
property As Expression(Of Func(Of TEntity, TProperty)) _
) As DbPropertyEntry(Of TEntity, TProperty)
'Utilisation
Dim instance As DbEntityEntry
Dim property As Expression(Of Func(Of TEntity, TProperty))
Dim returnValue As DbPropertyEntry(Of TEntity, TProperty)
returnValue = instance.Property(property)
[SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
[SuppressMessageAttribute("Microsoft.Naming", "CA1719:ParameterNamesShouldNotMatchMemberNames", MessageId = "0#",
Justification = "Rule predates more fluent naming conventions.")]
public DbPropertyEntry<TEntity, TProperty> Property<TProperty>(
Expression<Func<TEntity, TProperty>> property
)
[SuppressMessageAttribute(L"Microsoft.Design", L"CA1006:DoNotNestGenericTypesInMemberSignatures")]
[SuppressMessageAttribute(L"Microsoft.Naming", L"CA1719:ParameterNamesShouldNotMatchMemberNames", MessageId = L"0#",
Justification = L"Rule predates more fluent naming conventions.")]
public:
generic<typename TProperty>
DbPropertyEntry<TEntity, TProperty>^ Property(
Expression<Func<TEntity, TProperty>^>^ property
)
[<SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")>]
[<SuppressMessageAttribute("Microsoft.Naming", "CA1719:ParameterNamesShouldNotMatchMemberNames", MessageId = "0#",
Justification = "Rule predates more fluent naming conventions.")>]
member Property :
property:Expression<Func<'TEntity, 'TProperty>> -> DbPropertyEntry<'TEntity, 'TProperty>
JScript does not support generic types and methods.
Paramètres de type
- TProperty
Type de la propriété.
Paramètres
- property
Type : System.Linq.Expressions.Expression<Func<TEntity, TProperty>>
Expression qui représente la propriété.
Valeur de retour
Type : System.Data.Entity.Infrastructure.DbPropertyEntry<TEntity, TProperty>
Objet représentant la propriété.