logo
logo
  • Class Query

    Describes a query for entities.

    Inheritance
    System.Object
    Query
    Namespace: Stylelabs.M.Base.Querying
    Assembly: Stylelabs.M.Sdk.dll
    Syntax
    public class Query : QueryLoadingResource

    Properties

    EntityLoadOptions

    Indicates if and how entities resulting entities should be loaded. By default, no entities will be loaded.

    Declaration
    public EntityLoadOptions EntityLoadOptions { get; set; }
    Property Value
    Type Description
    EntityLoadOptions

    Filter

    Declaration
    public QueryFilter Filter { get; set; }
    Property Value
    Type Description
    QueryFilter

    ScrollTime

    If specified, the query will return as , which can be used to walk through the set of results without having to use paging.

    Declaration
    public TimeSpan? ScrollTime { get; set; }
    Property Value
    Type Description
    System.Nullable<TimeSpan>

    Skip

    The number of items to skip. If not specified, no items will be skipped.

    Declaration
    public int? Skip { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Int32>

    Sorting

    Indicates how the results should be sorted.

    Declaration
    public IEnumerable<Sorting> Sorting { get; set; }
    Property Value
    Type Description
    IEnumerable<Sorting>

    Take

    The number of items to take. If not specified, the underlying implementation will use a default value.

    Declaration
    public int? Take { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Int32>

    Methods

    CreateEntitiesQuery(Func<QueryableEntities<IQueryableEntity>, IQueryable<IQueryableEntity>>)

    Creates a Query from a linq expression. The query has set to True, loading the resulting entities.

    Declaration
    public static Query CreateEntitiesQuery(Func<QueryableEntities<IQueryableEntity>, IQueryable<IQueryableEntity>> query)
    Parameters
    Type Name Description
    Func<QueryableEntities<IQueryableEntity>, IQueryable<IQueryableEntity>> query

    Creates the linq expression.

    Returns
    Type Description
    Query

    A Query created from the specified query.

    CreateIdsQuery(Func<QueryableEntities<IQueryableEntity>, IQueryable<IQueryableEntity>>)

    Creates a Query from a linq expression. Only returns the ids of the resulting entities.

    Declaration
    public static Query CreateIdsQuery(Func<QueryableEntities<IQueryableEntity>, IQueryable<IQueryableEntity>> query)
    Parameters
    Type Name Description
    Func<QueryableEntities<IQueryableEntity>, IQueryable<IQueryableEntity>> query

    Creates the linq expression.

    Returns
    Type Description
    Query

    A Query created from the specified query.

    CreateQuery(Func<QueryableEntities<IQueryableEntity>, IQueryable<IQueryableEntity>>)

    Declaration
    public static Query CreateQuery(Func<QueryableEntities<IQueryableEntity>, IQueryable<IQueryableEntity>> query)
    Parameters
    Type Name Description
    Func<QueryableEntities<IQueryableEntity>, IQueryable<IQueryableEntity>> query
    Returns
    Type Description
    Query

    Extension Methods

    Can we improve this article ? Provide feedback