Search Results for

    Show / Hide Table of Contents
    View Source

    Interface IQuery<T>

    Represents a query for building Linq translatable SQL queries

    Namespace: Umbraco.Cms.Core.Persistence.Querying
    Assembly: Umbraco.Core.dll
    Syntax
    public interface IQuery<T>
    Type Parameters
    Name Description
    T

    Methods

    View Source

    GetWhereClauses()

    Returns all translated where clauses and their sql parameters

    Declaration
    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
    IQuery<T> Where(Expression<Func<T, bool>> predicate)
    Parameters
    Type Name Description
    System.Linq.Expressions.Expression<Func<T, System.Boolean>> predicate
    Returns
    Type Description
    IQuery<T>

    This instance so calls to this method are chainable

    View Source

    WhereAny(IEnumerable<Expression<Func<T, Boolean>>>)

    Adds a set of OR-ed where clauses to the query.

    Declaration
    IQuery<T> WhereAny(IEnumerable<Expression<Func<T, bool>>> predicates)
    Parameters
    Type Name Description
    System.Collections.IEnumerable<System.Linq.Expressions.Expression<Func<T, System.Boolean>>> predicates
    Returns
    Type Description
    IQuery<T>

    This instance so calls to this method are chainable.

    View Source

    WhereIn(Expression<Func<T, Object>>, IEnumerable)

    Adds a where-in clause to the query

    Declaration
    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
    Type Description
    IQuery<T>

    This instance so calls to this method are chainable

    • Improve this Doc
    • View Source
    In This Article
    • Methods
      • GetWhereClauses()
      • Where(Expression<Func<T, Boolean>>)
      • WhereAny(IEnumerable<Expression<Func<T, Boolean>>>)
      • WhereIn(Expression<Func<T, Object>>, IEnumerable)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX