Share via


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 声明的。

适用于