DbExpressionBuilder.Property Method

Definition

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

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.

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

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.

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.

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

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.

Exceptions

navigationProperty or instance is null.

Applies to

Property(DbExpression, RelationshipEndMember)

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

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

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.

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:
[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

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