View Source
Class Query<T>
Represents a query builder.
Inheritance
System.Object
Assembly: Umbraco.Infrastructure.dll
Syntax
public class Query<T> : IQuery<T>
Type Parameters
Constructors
View Source
Query(ISqlContext)
Declaration
public Query(ISqlContext sqlContext)
Parameters
Methods
View Source
GetWhereClauses()
Returns all translated where clauses and their sql parameters
Declaration
public IEnumerable<Tuple<string, object[]>> GetWhereClauses()
Returns
Type |
Description |
System.Collections.IEnumerable<Tuple<System.String, System.Object[]>> |
|
View Source
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<Func<T, System.Boolean>> |
predicate |
|
Returns
View Source
WhereAny(Nullable<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.Nullable<System.Collections.IEnumerable<System.Linq.Expressions.Expression<Func<T, System.Boolean>>>> |
predicates |
|
Returns
View Source
WhereIn(Expression<Func<T, Object>>, IEnumerable)
Adds a where-in clause to the query.
Declaration
public virtual IQuery<T> WhereIn(Expression<Func<T, object>> fieldSelector, IEnumerable values)
Parameters
Type |
Name |
Description |
System.Linq.Expressions.Expression<Func<T, System.Object>> |
fieldSelector |
|
System.Collections.IEnumerable |
values |
|
Returns