Class PropBlock
A reference to a property in a query, resolved against the entity type on construction.
public class PropBlock : BaseBlock
- Inheritance
-
PropBlock
- Inherited Members
Constructors
PropBlock(string, Type)
Resolve a property path against an entity type.
public PropBlock(string propertyPath, Type entityType)
Parameters
propertyPathstringA property name, or several joined with '.'.
entityTypeTypeThe type the path starts from.
Exceptions
- Exception
The path does not name a property of that type.
Properties
DataType
The data type the property returns.
public override DataType DataType { get; }
Property Value
Exceptions
- Exception
The path ends in a navigation property, which has no data type.
EntityType
The entity type the path was resolved against.
public Type EntityType { get; }
Property Value
Property
The resolved property chain behind PropertyPath.
public PropertySignature Property { get; }
Property Value
PropertyPath
The property path as the client wrote it, e.g. "Customer.CompanyName".
public string PropertyPath { get; }
Property Value
Methods
ToExpression(Expression)
Build the member access that reads this property off the row.
public override Expression ToExpression(Expression inExpr)
Parameters
inExprExpressionThe query's lambda parameter.
Returns
- Expression
The member access expression, e.g. ent.Customer.CompanyName.