Share via


DbExpressionBuilder.Property Method

Definition

Overloads

Property(DbExpression, EdmProperty)

Creates a new DbPropertyExpression representing the retrieval of the specified property.

Property(DbExpression, NavigationProperty)

Creates a new DbPropertyExpression representing the retrieval of the specified navigation property.

Property(DbExpression, RelationshipEndMember)

Creates a new DbPropertyExpression representing the retrieval of the specified relationship end member.

Property(DbExpression, String)

Creates a new DbPropertyExpression representing the retrieval of the instance property with the specified name from the given instance.

Property(DbExpression, EdmProperty)

Creates a new DbPropertyExpression representing the retrieval of the specified property.

[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

Parameters

instance
DbExpression

The instance from which to retrieve the property. May be null if the property is static.

propertyMetadata
EdmProperty

Metadata for the property to retrieve.

Returns

A new DbPropertyExpression representing the property retrieval.

Attributes

Exceptions

propertyMetadata is null or instance is null and the property is not static.

Applies to

Property(DbExpression, NavigationProperty)

Creates a new DbPropertyExpression representing the retrieval of the specified navigation property.

[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

Parameters

instance
DbExpression

The instance from which to retrieve the navigation property.

navigationProperty
NavigationProperty

Metadata for the navigation property to retrieve.

Returns

A new DbPropertyExpression representing the navigation property retrieval.

Attributes

Exceptions

navigationProperty or instance is null.

Applies to

Property(DbExpression, RelationshipEndMember)

Creates a new DbPropertyExpression representing the retrieval of the specified relationship end member.

[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

Parameters

instance
DbExpression

The instance from which to retrieve the relationship end member.

relationshipEnd
RelationshipEndMember

Metadata for the relationship end member to retrieve.

Returns

A new DbPropertyExpression representing the relationship end member retrieval.

Attributes

Exceptions

relationshipEnd is null or instance is null and the property is not static.

Applies to

Property(DbExpression, String)

Creates a new DbPropertyExpression representing the retrieval of the instance property with the specified name from the given instance.

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

Parameters

instance
DbExpression

The instance from which to retrieve the property.

propertyName
String

The name of the property to retrieve.

Returns

A new DbPropertyExpression that represents the property retrieval.

Exceptions

propertyName is null or instance is null and the property is not static.

No property with the specified name is declared by the type of instance.

Applies to