Groups the entities by keySelector for a Select of the group keys and aggregates, translated to $apply=groupby(...), or to $apply=aggregate(...) when the key is a constant such as 1, which puts every entity in one group. Every Where before it becomes a filter(...) transformation that runs before the grouping.
Declaration
public GroupedODataQuery<T, TKey> GroupBy(Expressions.Expression<Func<T, TKey>> keySelector)
Parameters
Returns
Expands the navigation property that navigation selects, translated to $expand. A path such as ticket => ticket.Team.Schedule expands each level, and a collection can be filtered, ordered and paged with Where, OrderBy, OrderByDescending, ThenBy, ThenByDescending, Skip and Take, e.g. ticket => ticket.Comments.OrderByDescending(comment => comment.CreatedAt).Take(3).
Declaration
public IncludableODataQuery<T, TProperty> Include(Expressions.Expression<Func<T, TProperty>> navigation)
Parameters
Returns
Orders the entities by keySelector ascending, translated to $orderby. Replaces any earlier ordering.
Declaration
public OrderedODataQuery<T> OrderBy(Expressions.Expression<Func<T, TKey>> keySelector)
Parameters
Returns
Orders the entities by keySelector descending, translated to $orderby. Replaces any earlier ordering.
Declaration
public OrderedODataQuery<T> OrderByDescending(Expressions.Expression<Func<T, TKey>> keySelector)
Parameters
Returns
Skips count entities, translated to $skip. Call it once, before Int32).
Declaration
public ODataQuery<T> Skip(int count)
Parameters
Returns
Takes at most count entities, translated to $top. Call it once.
Declaration
public ODataQuery<T> Take(int count)
Parameters
Returns
Returns the query options with each value escaped once with String), e.g. $filter=Name%20eq%20%27O%27%27Brien%27&$top=10.
Declaration
public string ToQueryString()
Returns
Returns the query options unescaped, e.g. $filter=Name eq 'O''Brien'&$top=10.
Declaration
public override string ToString()
Returns
Filters the entities with predicate, translated to $filter. Repeated calls combine with and.
Declaration
public ODataQuery<T> Where(Expressions.Expression<Func<T, bool>> predicate)
Parameters
Returns
Requests the total count of the filtered entities, translated to $count=true.
Declaration
public ODataQuery<T> WithCount()
Returns