Class Query<T>
Represents the Query Builder for building LINQ translatable queries
Inheritance
System.Object
Namespace:System.Dynamic.ExpandoObject
Assembly:Umbraco.Core.dll
Syntax
public class Query<T> : IQuery<T>
Type Parameters
Name | Description |
---|---|
T |
Properties
Builder
Helper method to be used instead of manually creating an instance
Declaration
public static IQuery<T> Builder { get; }
Property Value
Type | Description |
---|---|
IQuery<T> |
Methods
GetWhereClauses()
Returns all translated where clauses and their sql parameters
Declaration
public IEnumerable<Tuple<string, object[]>> GetWhereClauses()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Tuple<System.String, System.Object[]>> |
Where(Expression<Func<T, Boolean>>)
Adds a where clause to the query
Declaration
public virtual IQuery<T> Where(Expression<Func<T, bool>> predicate)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.Expressions.Expression<System.Func<T, System.Boolean>> | predicate |
Returns
Type | Description |
---|---|
IQuery<T> | This instance so calls to this method are chainable |
WhereAny(IEnumerable<Expression<Func<T, Boolean>>>)
Adds a set of OR-ed where clauses to the query.
Declaration
public virtual IQuery<T> WhereAny(IEnumerable<Expression<Func<T, bool>>> predicates)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.Linq.Expressions.Expression<System.Func<T, System.Boolean>>> | predicates |
Returns
Type | Description |
---|---|
IQuery<T> | This instance so calls to this method are chainable. |
WhereClauses()
Declaration
[Obsolete("This is no longer used, use the GetWhereClauses method which includes the SQL parameters")]
public List<string> WhereClauses()
Returns
Type | Description |
---|---|
System.Collections.Generic.List<System.String> |