Search Results for

    Show / Hide Table of Contents

    Class QueryableExecuter<T>

    A QueryableExecuter that operates against the specified interface of type T

    Inheritance
    object
    QueryableExecuter
    QueryableExecuter<T>
    QueryableExecuter<T, TT>
    Implements
    ICloneable
    ICloneable<QueryableExecuter>
    ICloneable<QueryableExecuter<T>>
    Inherited Members
    QueryableExecuter.RemoveOrderBy(string)
    QueryableExecuter.AddValueTranslator(string, Func<object, object>)
    QueryableExecuter.Clear(QueryableExecuterApplyType)
    QueryableExecuter.AlterPagingByLocalCount(int, int)
    QueryableExecuter.HasPaging()
    QueryableExecuter.ResetPagingFromLocalCount()
    QueryableExecuter.SetTotalCount(int)
    QueryableExecuter.OrderBy(IEnumerable<QueryableSort>)
    QueryableExecuter.OrderBy(QueryableSort)
    QueryableExecuter.Where(string, SQLOperator, object, bool)
    QueryableExecuter.Where(string, string, SQLOperator, bool)
    QueryableExecuter.TranslateProperty(string, string)
    QueryableExecuter.SetWhereFilter(GroupType, IEnumerable<QueryableFilter>)
    QueryableExecuter.CreateOfType(Type, bool)
    QueryableExecuter.CreateOfType(Type, Type, bool)
    QueryableExecuter.Deserialize(Type, string, IEnumerable<Type>)
    QueryableExecuter.Deserialize<T>(string, IEnumerable<Type>)
    QueryableExecuter.Deserialize(Type, Type, string, IEnumerable<Type>)
    QueryableExecuter.Deserialize<T, TT>(string, IEnumerable<Type>)
    QueryableExecuter.CopyFromSource(QueryableExecuter)
    QueryableExecuter.OrderBys
    QueryableExecuter.Wheres
    QueryableExecuter.IsODataQuery
    QueryableExecuter.TotalCount
    QueryableExecuter.GetSkip
    QueryableExecuter.GetTop
    QueryableExecuter.WhereGroupType
    QueryableExecuter.IncludeTotalCountInQuery
    QueryableExecuter.HasWhereFilter
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: LemonEdge.Utils
    Assembly: LemonEdge.Utils.dll
    Syntax
    [DataContract]
    public class QueryableExecuter<T> : QueryableExecuter, ICloneable, ICloneable<QueryableExecuter>, ICloneable<QueryableExecuter<T>>
    Type Parameters
    Name Description
    T

    The type of interface this QueryableExecuter executes against

    Constructors

    QueryableExecuter(bool)

    Declaration
    protected QueryableExecuter(bool oDataQuery)
    Parameters
    Type Name Description
    bool oDataQuery

    Properties

    AltersQuery

    Indicates if the QueryableExecuter has any order by, where filters, skip or top settings that would alter any IQueryable set when applied to it using ApplyQueryExecuter(IQueryable, QueryableExecuterApplyType, bool)

    Declaration
    public override bool AltersQuery { get; }
    Property Value
    Type Description
    bool
    Overrides
    QueryableExecuter.AltersQuery

    InterfaceType

    Holds the interface type this QueryableExecuter is executing against.

    All queries in LemonEdge can be run against interface or their class definitions

    Declaration
    public override Type InterfaceType { get; }
    Property Value
    Type Description
    Type
    Overrides
    QueryableExecuter.InterfaceType

    LamdaWheres

    Declaration
    protected IEnumerable<Expression<Func<T, bool>>> LamdaWheres { get; }
    Property Value
    Type Description
    IEnumerable<Expression<Func<T, bool>>>

    QueryType

    Holds the actual class type this QueryableExecuter is executing against.

    All queries in LemonEdge can be run against interface or their class definitions

    Declaration
    public override Type QueryType { get; }
    Property Value
    Type Description
    Type
    Overrides
    QueryableExecuter.QueryType

    Methods

    ApplyGenericWheres(IQueryable, bool)

    Declaration
    protected virtual IQueryable ApplyGenericWheres(IQueryable items, bool isODataQuery)
    Parameters
    Type Name Description
    IQueryable items
    bool isODataQuery
    Returns
    Type Description
    IQueryable

    ApplyGenericWheres<X>(IQueryable, IEnumerable<Expression<Func<X, bool>>>)

    Declaration
    protected IQueryable ApplyGenericWheres<X>(IQueryable items, IEnumerable<Expression<Func<X, bool>>> wheres)
    Parameters
    Type Name Description
    IQueryable items
    IEnumerable<Expression<Func<X, bool>>> wheres
    Returns
    Type Description
    IQueryable
    Type Parameters
    Name Description
    X

    ApplyQueryExecuter(IQueryable, QueryableExecuterApplyType, bool)

    Applies this queryable executer set of filters (definied through the type of Top, Skip, Wheres, OrderBys) to the specified IQueryable items using Linq extensions

    Declaration
    public override IQueryable ApplyQueryExecuter(IQueryable items, QueryableExecuterApplyType type, bool isODataQuery)
    Parameters
    Type Name Description
    IQueryable items

    The items to apply the specified filtering of the query to, this can be in memory objects, datasets for direct database access, or web service odata items

    QueryableExecuterApplyType type

    The type of filters to apply

    bool isODataQuery

    Indicates if these items are being executed against web service odata items

    Returns
    Type Description
    IQueryable

    The IQueryable items with the QueryableExecuter filters applied against them

    Overrides
    QueryableExecuter.ApplyQueryExecuter(IQueryable, QueryableExecuterApplyType, bool)

    Clone()

    Creates a new instance of this class (of type QueryableExecuter<T>) with all the same property values as this instance

    Declaration
    public QueryableExecuter<T> Clone()
    Returns
    Type Description
    QueryableExecuter<T>

    A new instance of this class with all the same property values as this instance

    ConvertItems(IQueryable)

    Ensures that when this QueryExecuter is applied against a collection of items that they are of the expected type

    Declaration
    protected virtual IQueryable ConvertItems(IQueryable items)
    Parameters
    Type Name Description
    IQueryable items

    The collection of items to apply this QueryableExecuter against

    Returns
    Type Description
    IQueryable

    The collection of items conforming to being IQueryable<T>

    CopyFromSource(QueryableExecuter<T>)

    Implementation of CopyFromSource(T). Sets all values of this QueryableExecuter to the same as the supplied source

    Declaration
    public void CopyFromSource(QueryableExecuter<T> source)
    Parameters
    Type Name Description
    QueryableExecuter<T> source

    A source QueryableExecuter to copy all values from

    Create(bool)

    Creates a new QueryableExecuter<T, TT> with the TT type being the actual entity class associated with the T interface. If there is none, returns a QueryableExecuter<T> for just this type

    Declaration
    public static QueryableExecuter<T> Create(bool oDataQuery)
    Parameters
    Type Name Description
    bool oDataQuery

    Indicates if this queryableexecuter is being operated against an odata web service collection of items or not

    Returns
    Type Description
    QueryableExecuter<T>

    A new QueryableExecuter<T, TT> with the TT type being the actual entity class associated with the T interface. If there is none, returns a QueryableExecuter<T> for just this type

    Create(Type, bool)

    Creates a new QueryableExecuter<T, TT> with the TT type being specified from inheritingTypeTT that must inherit/implement type T

    Declaration
    public static QueryableExecuter<T> Create(Type inheritingTypeTT, bool oDataQuery)
    Parameters
    Type Name Description
    Type inheritingTypeTT

    The type of the class that this queryablefilter actually operates against

    bool oDataQuery

    Indicates if this queryableexecuter is being operated against an odata web service collection of items or not

    Returns
    Type Description
    QueryableExecuter<T>

    A new QueryableExecuter<T, TT> with the TT type being specified from inheritingTypeTT that must inherit/implement type T

    CreateNewItem()

    Returns a new instance of this inheriting type from QueryableExecuter. Used for Clone() implementations to always return the correct new type as an exact copy of the current one

    Declaration
    protected override QueryableExecuter CreateNewItem()
    Returns
    Type Description
    QueryableExecuter

    A new QUeryableExecuter that is of the same inheriting type as this current one

    Overrides
    QueryableExecuter.CreateNewItem()

    GetAsSingleFilter()

    Declaration
    public Expression<Func<T, bool>> GetAsSingleFilter()
    Returns
    Type Description
    Expression<Func<T, bool>>

    GetFilters()

    Returns the Where filters in this QueryableExecuter as Linq Expressions typed to type T

    Declaration
    public IEnumerable<Expression<Func<T, bool>>> GetFilters()
    Returns
    Type Description
    IEnumerable<Expression<Func<T, bool>>>

    The Where filters in this QueryableExecuter as Linq Expressions typed to type T

    OrderBy(string, Order)

    Declaration
    public QueryableExecuter<T> OrderBy(string propName, Order direction)
    Parameters
    Type Name Description
    string propName
    Order direction
    Returns
    Type Description
    QueryableExecuter<T>

    Skip(int)

    Declaration
    public QueryableExecuter<T> Skip(int count)
    Parameters
    Type Name Description
    int count
    Returns
    Type Description
    QueryableExecuter<T>

    Top(int)

    Declaration
    public QueryableExecuter<T> Top(int count)
    Parameters
    Type Name Description
    int count
    Returns
    Type Description
    QueryableExecuter<T>

    Where(QueryableFilter)

    Declaration
    public QueryableExecuter<T> Where(QueryableFilter filter)
    Parameters
    Type Name Description
    QueryableFilter filter
    Returns
    Type Description
    QueryableExecuter<T>

    Where(string, SQLOperator, object)

    Declaration
    public QueryableExecuter<T> Where(string propName, SQLOperator op, object value)
    Parameters
    Type Name Description
    string propName
    SQLOperator op
    object value
    Returns
    Type Description
    QueryableExecuter<T>

    Where(string, string, SQLOperator)

    Declaration
    public QueryableExecuter<T> Where(string propName, string propName2, SQLOperator op)
    Parameters
    Type Name Description
    string propName
    string propName2
    SQLOperator op
    Returns
    Type Description
    QueryableExecuter<T>

    Implements

    ICloneable
    ICloneable<T>
    ICloneable<T>

    Extension Methods

    QueryExecuterHelper.MergeQueryResults<T>(QueryableExecuter, (List<T> NewItems, List<T> UpdatedItems, List<T> DeletedItems), IQueryable, IEnumerable<T>, IEqualityComparer<T>)
    LinqExtensions.AsArray<T>(T)
    LinqExtensions.ToArrayOfOne<T>(T)
    LinqExtensions.ToListOfOne<T>(T)
    MiscExtensions.SetIfNotEqual<T, TP>(T, Expression<Func<T, TP>>, TP)
    WeakReferenceExtensions.WeakReference(object)
    SQLExtensions.ToSQLValue(object, bool)
    ReflectionExtensions.ClearEventInvocations(object, string)
    StringExtensions.ToCSVFormatString(object, Type)

    See Also

    QueryableExecuter
    QueryableExecuter<T, TT>
    In this article
    Back to top © LemonEdge Technologies. All rights reserved.