Class SelectClause
The select clause of an EntityQuery - the properties to project, in place of whole entities.
public class SelectClause
- Inheritance
-
SelectClause
- Inherited Members
Remarks
Each path names a property, or a path through navigation properties to one, as in "Customer.CompanyName". The paths are only resolved once Validate(Type) has been given the entity type.
Constructors
SelectClause(IEnumerable<string>)
Create a select clause over a set of property paths.
public SelectClause(IEnumerable<string> propertyPaths)
Parameters
propertyPathsIEnumerable<string>The property paths to select, e.g. "Customer.CompanyName".
Properties
Properties
The resolved properties. Only available after Validate(Type) has run; reading it before that throws.
public IEnumerable<PropertySignature> Properties { get; }
Property Value
PropertyPaths
The property paths to select, as they were written.
public IEnumerable<string> PropertyPaths { get; }
Property Value
Methods
From(IEnumerable?)
Build a select clause, or null if the query does not project.
public static SelectClause? From(IEnumerable? propertyPaths)
Parameters
propertyPathsIEnumerableThe property paths to select; null when the query has no select clause.
Returns
- SelectClause
The clause, or null if
propertyPathswas null.
Validate(Type)
Resolve every path against the entity type being queried, filling in Properties.
public void Validate(Type entityType)
Parameters
entityTypeTypeThe type the query returns.
Exceptions
- Exception
A path does not name a property of that type.