DbComplexPropertyEntry<TEntity, TComplexProperty>.Property<TNestedProperty> 方法 (Expression<Func<TComplexProperty, TNestedProperty>>)

[本页针对的是实体框架版本 6。最新版本以“实体框架”NuGet 包的形式提供。有关实体框架的更多信息,请参见 msdn.com/data/ef。]

获取表示此属性的嵌套属性的对象。 此方法可用于标量属性和/或复杂属性。

命名空间:  System.Data.Entity.Infrastructure
程序集:  EntityFramework(在 EntityFramework.dll 中)

语法

声明
<SuppressMessageAttribute("Microsoft.Naming", "CA1719:ParameterNamesShouldNotMatchMemberNames", MessageId := "0#",  _
    Justification := "Rule predates more fluent naming conventions.")> _
<SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")> _
Public Function Property(Of TNestedProperty) ( _
    property As Expression(Of Func(Of TComplexProperty, TNestedProperty)) _
) As DbPropertyEntry(Of TEntity, TNestedProperty)
用法
Dim instance As DbComplexPropertyEntry 
Dim property As Expression(Of Func(Of TComplexProperty, TNestedProperty))
Dim returnValue As DbPropertyEntry(Of TEntity, TNestedProperty)

returnValue = instance.Property(property)
[SuppressMessageAttribute("Microsoft.Naming", "CA1719:ParameterNamesShouldNotMatchMemberNames", MessageId = "0#", 
    Justification = "Rule predates more fluent naming conventions.")]
[SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
public DbPropertyEntry<TEntity, TNestedProperty> Property<TNestedProperty>(
    Expression<Func<TComplexProperty, TNestedProperty>> property
)
[SuppressMessageAttribute(L"Microsoft.Naming", L"CA1719:ParameterNamesShouldNotMatchMemberNames", MessageId = L"0#", 
    Justification = L"Rule predates more fluent naming conventions.")]
[SuppressMessageAttribute(L"Microsoft.Design", L"CA1006:DoNotNestGenericTypesInMemberSignatures")]
public:
generic<typename TNestedProperty>
DbPropertyEntry<TEntity, TNestedProperty>^ Property(
    Expression<Func<TComplexProperty, TNestedProperty>^>^ property
)
[<SuppressMessageAttribute("Microsoft.Naming", "CA1719:ParameterNamesShouldNotMatchMemberNames", MessageId = "0#", 
    Justification = "Rule predates more fluent naming conventions.")>]
[<SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")>]
member Property : 
        property:Expression<Func<'TComplexProperty, 'TNestedProperty>> -> DbPropertyEntry<'TEntity, 'TNestedProperty> 
JScript does not support generic types and methods.

类型参数

  • TNestedProperty
    嵌套属性的类型。

参数

返回值

类型:System.Data.Entity.Infrastructure.DbPropertyEntry<TEntity, TNestedProperty>
表示嵌套属性的对象。

请参阅

参考

DbComplexPropertyEntry<TEntity, TComplexProperty> 类

Property 重载

System.Data.Entity.Infrastructure 命名空间