Прочетете на английски Редактиране

Споделяне чрез


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.

C#
public static System.Data.Common.CommandTrees.DbPropertyExpression Property(this System.Data.Common.CommandTrees.DbExpression instance, System.Data.Metadata.Edm.EdmProperty propertyMetadata);

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

.NET Framework 4.8.1 и други версии
Продукт Версии
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

Property(DbExpression, NavigationProperty)

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

C#
public static System.Data.Common.CommandTrees.DbPropertyExpression Property(this System.Data.Common.CommandTrees.DbExpression instance, System.Data.Metadata.Edm.NavigationProperty navigationProperty);

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

.NET Framework 4.8.1 и други версии
Продукт Версии
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

Property(DbExpression, RelationshipEndMember)

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

C#
public static System.Data.Common.CommandTrees.DbPropertyExpression Property(this System.Data.Common.CommandTrees.DbExpression instance, System.Data.Metadata.Edm.RelationshipEndMember relationshipEnd);

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

.NET Framework 4.8.1 и други версии
Продукт Версии
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

Property(DbExpression, String)

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

C#
public static System.Data.Common.CommandTrees.DbPropertyExpression Property(this System.Data.Common.CommandTrees.DbExpression instance, string propertyName);

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

.NET Framework 4.8.1 и други версии
Продукт Версии
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1