View Source
Class Query<T>
Represents a query builder.
Inheritance
System.Object
Assembly: Umbraco.Core.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.Generic.IEnumerable<System.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<System.Func<T, System.Boolean>> |
predicate |
|
Returns
View Source
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
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<System.Func<T, System.Object>> |
fieldSelector |
|
System.Collections.IEnumerable |
values |
|
Returns