DbExpressionBuilder.Property 方法

定义

重载

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

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

propertyMetadata
EdmProperty

要检索的属性的元数据。

返回

表示属性检索的新 DbPropertyExpression。

属性

例外

propertyMetadata 为 null 或 instance 为 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 或 实例为 null。

适用于

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,并且 属性不是静态的。

实例类型不会声明具有指定名称的属性。

适用于