DbExpressionBuilder.Property Method
Creates a new DbPropertyExpression.
Assembly: EntityFramework (in EntityFramework.dll)
Name | Description | |
---|---|---|
![]() ![]() | 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. |
DbExpressionBuilder.Property Method (DbExpression, EdmProperty)
Creates a new DbPropertyExpression representing the retrieval of the specified property.
[SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters", Justification = "required for this feature")] public static DbPropertyExpression Property( this DbExpression instance, EdmProperty propertyMetadata )
Parameters
- instance
-
Type:
System.Data.Entity.Core.Common.CommandTrees.DbExpression
The instance from which to retrieve the property. May be null if the property is static.
- propertyMetadata
-
Type:
System.Data.Entity.Core.Metadata.Edm.EdmProperty
Metadata for the property to retrieve.
Return Value
Type: System.Data.Entity.Core.Common.CommandTrees.DbPropertyExpressionA new DbPropertyExpression representing the property retrieval.
Exception | Condition |
---|---|
ArgumentNullException | propertyMetadata is null or instance is null and the property is not static. |
DbExpressionBuilder.Property Method (DbExpression, NavigationProperty)
Creates a new DbPropertyExpression representing the retrieval of the specified navigation property.
[SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters", Justification = "required for this feature")] public static DbPropertyExpression Property( this DbExpression instance, NavigationProperty navigationProperty )
Parameters
- instance
-
Type:
System.Data.Entity.Core.Common.CommandTrees.DbExpression
The instance from which to retrieve the navigation property.
- navigationProperty
-
Type:
System.Data.Entity.Core.Metadata.Edm.NavigationProperty
Metadata for the navigation property to retrieve.
Return Value
Type: System.Data.Entity.Core.Common.CommandTrees.DbPropertyExpressionA new DbPropertyExpression representing the navigation property retrieval.
Exception | Condition |
---|---|
ArgumentNullException | navigationProperty is null or instance is null. |
DbExpressionBuilder.Property Method (DbExpression, RelationshipEndMember)
Creates a new DbPropertyExpression representing the retrieval of the specified relationship end member.
[SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters", Justification = "required for this feature")] public static DbPropertyExpression Property( this DbExpression instance, RelationshipEndMember relationshipEnd )
Parameters
- instance
-
Type:
System.Data.Entity.Core.Common.CommandTrees.DbExpression
The instance from which to retrieve the relationship end member.
- relationshipEnd
-
Type:
System.Data.Entity.Core.Metadata.Edm.RelationshipEndMember
Metadata for the relationship end member to retrieve.
Return Value
Type: System.Data.Entity.Core.Common.CommandTrees.DbPropertyExpressionA new DbPropertyExpression representing the relationship end member retrieval.
Exception | Condition |
---|---|
ArgumentNullException | relationshipEnd is null or instance is null and the property is not static. |
DbExpressionBuilder.Property Method (DbExpression, String)
Creates a new DbPropertyExpression representing the retrieval of the instance property with the specified name from the given instance.
public static DbPropertyExpression Property( this DbExpression instance, string propertyName )
Parameters
- instance
-
Type:
System.Data.Entity.Core.Common.CommandTrees.DbExpression
The instance from which to retrieve the property.
- propertyName
-
Type:
System.String
The name of the property to retrieve.
Return Value
Type: System.Data.Entity.Core.Common.CommandTrees.DbPropertyExpressionA new DbPropertyExpression that represents the property retrieval.
Exception | Condition |
---|---|
ArgumentNullException | propertyName is null or instance is null and the property is not static. |
ArgumentOutOfRangeException | No property with the specified name is declared by the type of instance. |