DbExpressionBuilder.Property 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| Property(DbExpression, EdmProperty) |
建立 DbPropertyExpression 一個代表指定屬性檢索的新 |
| Property(DbExpression, NavigationProperty) |
建立 DbPropertyExpression 一個代表指定導航屬性檢索的新資料。 |
| Property(DbExpression, RelationshipEndMember) |
建立一個新資料 DbPropertyExpression ,代表指定關係端成員的檢索過程。 |
| Property(DbExpression, String) |
建立一個新資料 DbPropertyExpression ,代表從指定實例中取得指定名稱的實例屬性。 |
Property(DbExpression, EdmProperty)
建立 DbPropertyExpression 一個代表指定屬性檢索的新
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters", Justification="required for this feature")]
public static System.Data.Entity.Core.Common.CommandTrees.DbPropertyExpression Property(this System.Data.Entity.Core.Common.CommandTrees.DbExpression instance, System.Data.Entity.Core.Metadata.Edm.EdmProperty propertyMetadata);
static member Property : System.Data.Entity.Core.Common.CommandTrees.DbExpression * System.Data.Entity.Core.Metadata.Edm.EdmProperty -> System.Data.Entity.Core.Common.CommandTrees.DbPropertyExpression
<Extension()>
Public Function Property (instance As DbExpression, propertyMetadata As EdmProperty) As DbPropertyExpression
參數
- instance
- DbExpression
從中取得該屬性的實例。 如果性質是靜態的,則可能是空。
- propertyMetadata
- EdmProperty
屬性要取回的元資料。
傳回
一個新的 DbPropertyExpression 代表屬性檢索。
- 屬性
例外狀況
propertyMetadata 為 null 或實例為 null,且屬性非靜態。
適用於
Property(DbExpression, NavigationProperty)
建立 DbPropertyExpression 一個代表指定導航屬性檢索的新資料。
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters", Justification="required for this feature")]
public static System.Data.Entity.Core.Common.CommandTrees.DbPropertyExpression Property(this System.Data.Entity.Core.Common.CommandTrees.DbExpression instance, System.Data.Entity.Core.Metadata.Edm.NavigationProperty navigationProperty);
static member Property : System.Data.Entity.Core.Common.CommandTrees.DbExpression * System.Data.Entity.Core.Metadata.Edm.NavigationProperty -> System.Data.Entity.Core.Common.CommandTrees.DbPropertyExpression
參數
- instance
- DbExpression
從中擷取導航屬性的實例。
- navigationProperty
- NavigationProperty
導航屬性的元資料,需取得。
傳回
一個新的 DbPropertyExpression,代表導航屬性的檢索。
- 屬性
例外狀況
navigationProperty 或實例為空。
適用於
Property(DbExpression, RelationshipEndMember)
建立一個新資料 DbPropertyExpression ,代表指定關係端成員的檢索過程。
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters", Justification="required for this feature")]
public static System.Data.Entity.Core.Common.CommandTrees.DbPropertyExpression Property(this System.Data.Entity.Core.Common.CommandTrees.DbExpression instance, System.Data.Entity.Core.Metadata.Edm.RelationshipEndMember relationshipEnd);
static member Property : System.Data.Entity.Core.Common.CommandTrees.DbExpression * System.Data.Entity.Core.Metadata.Edm.RelationshipEndMember -> System.Data.Entity.Core.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 static System.Data.Entity.Core.Common.CommandTrees.DbPropertyExpression Property(this System.Data.Entity.Core.Common.CommandTrees.DbExpression instance, string propertyName);
static member Property : System.Data.Entity.Core.Common.CommandTrees.DbExpression * string -> System.Data.Entity.Core.Common.CommandTrees.DbPropertyExpression
<Extension()>
Public Function Property (instance As DbExpression, propertyName As String) As DbPropertyExpression
參數
- instance
- DbExpression
從中取得該屬性的實例。
- propertyName
- String
要取回的房產名稱。
傳回
一個新的 DbPropertyExpression,代表屬性的檢索。
例外狀況
propertyName 為 null 或 instance 為 null,且該屬性並非靜態。
該實例類型不會宣告任何指定名稱的屬性。