DbExpressionBuilder.Property 方法

定义

创建表示检索指定属性的新 DbPropertyExpression 属性。

重载

名称 说明
Property(DbExpression, EdmProperty)

创建表示检索指定属性的新 DbPropertyExpression 属性。

Property(DbExpression, NavigationProperty)

创建一个新的 DbPropertyExpression 表示检索指定的导航属性。

Property(DbExpression, RelationshipEndMember)

创建一个新 DbPropertyExpression 表示检索指定的关系结束成员。

Property(DbExpression, String)

创建一个新 DbPropertyExpression 值,表示从给定实例检索具有指定名称的实例属性。

Property(DbExpression, EdmProperty)

创建表示检索指定属性的新 DbPropertyExpression 属性。

public:
[System::Runtime::CompilerServices::Extension]
 static System::Data::Common::CommandTrees::DbPropertyExpression ^ Property(System::Data::Common::CommandTrees::DbExpression ^ instance, System::Data::Metadata::Edm::EdmProperty ^ propertyMetadata);
public static System.Data.Common.CommandTrees.DbPropertyExpression Property(this System.Data.Common.CommandTrees.DbExpression instance, System.Data.Metadata.Edm.EdmProperty propertyMetadata);
static member Property : System.Data.Common.CommandTrees.DbExpression * System.Data.Metadata.Edm.EdmProperty -> System.Data.Common.CommandTrees.DbPropertyExpression
<Extension()>
Public Function Property (instance As DbExpression, propertyMetadata As EdmProperty) As DbPropertyExpression

参数

instance
DbExpression

要从中检索属性的实例。 如果属性是静态的,则为 null。

propertyMetadata
EdmProperty

要检索的属性的元数据。

返回

表示属性检索的新 DbPropertyExpression。

例外

propertyMetadata 为 null 或 instance 为 null,并且属性不是静态的。

适用于

Property(DbExpression, NavigationProperty)

创建一个新的 DbPropertyExpression 表示检索指定的导航属性。

public:
[System::Runtime::CompilerServices::Extension]
 static System::Data::Common::CommandTrees::DbPropertyExpression ^ Property(System::Data::Common::CommandTrees::DbExpression ^ instance, System::Data::Metadata::Edm::NavigationProperty ^ navigationProperty);
public static System.Data.Common.CommandTrees.DbPropertyExpression Property(this System.Data.Common.CommandTrees.DbExpression instance, System.Data.Metadata.Edm.NavigationProperty navigationProperty);
static member Property : System.Data.Common.CommandTrees.DbExpression * System.Data.Metadata.Edm.NavigationProperty -> System.Data.Common.CommandTrees.DbPropertyExpression
<Extension()>
Public Function Property (instance As DbExpression, navigationProperty As NavigationProperty) As DbPropertyExpression

参数

instance
DbExpression

要从中检索导航属性的实例。

navigationProperty
NavigationProperty

要检索的导航属性的元数据。

返回

表示导航属性检索的新 DbPropertyExpression。

例外

navigationPropertyinstance 为 null。

适用于

Property(DbExpression, RelationshipEndMember)

创建一个新 DbPropertyExpression 表示检索指定的关系结束成员。

public:
[System::Runtime::CompilerServices::Extension]
 static System::Data::Common::CommandTrees::DbPropertyExpression ^ Property(System::Data::Common::CommandTrees::DbExpression ^ instance, System::Data::Metadata::Edm::RelationshipEndMember ^ relationshipEnd);
public static System.Data.Common.CommandTrees.DbPropertyExpression Property(this System.Data.Common.CommandTrees.DbExpression instance, System.Data.Metadata.Edm.RelationshipEndMember relationshipEnd);
static member Property : System.Data.Common.CommandTrees.DbExpression * System.Data.Metadata.Edm.RelationshipEndMember -> System.Data.Common.CommandTrees.DbPropertyExpression
<Extension()>
Public Function Property (instance As DbExpression, relationshipEnd As RelationshipEndMember) As DbPropertyExpression

参数

instance
DbExpression

要从中检索关系结束成员的实例。

relationshipEnd
RelationshipEndMember

要检索的关系结束成员的元数据。

返回

表示关系结束成员检索的新 DbPropertyExpression。

例外

relationshipEnd 为 null 或 instance 为 null,并且属性不是静态的。

适用于

Property(DbExpression, String)

创建一个新 DbPropertyExpression 值,表示从给定实例检索具有指定名称的实例属性。

public:
[System::Runtime::CompilerServices::Extension]
 static System::Data::Common::CommandTrees::DbPropertyExpression ^ Property(System::Data::Common::CommandTrees::DbExpression ^ instance, System::String ^ propertyName);
public static System.Data.Common.CommandTrees.DbPropertyExpression Property(this System.Data.Common.CommandTrees.DbExpression instance, string propertyName);
static member Property : System.Data.Common.CommandTrees.DbExpression * string -> System.Data.Common.CommandTrees.DbPropertyExpression
<Extension()>
Public Function Property (instance As DbExpression, propertyName As String) As DbPropertyExpression

参数

instance
DbExpression

要从中检索属性的实例。

propertyName
String

要检索的属性的名称。

返回

一个新的 DbPropertyExpression,表示属性检索。

例外

propertyName 为 null 或 instance 为 null,并且属性不是静态的。

没有具有指定名称的属性由类型 instance声明。

适用于