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 型別未宣告任何含有指定名稱的屬性。

適用於