Class QueryableExecuter<T>
A QueryableExecuter that operates against the specified interface of type T
Inheritance
QueryableExecuter<T>
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
Declaration
public override bool AltersQuery { get; }
Property Value
Overrides
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
Overrides
LamdaWheres
Declaration
protected IEnumerable<Expression<Func<T, bool>>> LamdaWheres { get; }
Property Value
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
Overrides
Methods
ApplyGenericWheres(IQueryable, bool)
Declaration
protected virtual IQueryable ApplyGenericWheres(IQueryable items, bool isODataQuery)
Parameters
Returns
ApplyGenericWheres<X>(IQueryable, IEnumerable<Expression<Func<X, bool>>>)
Declaration
protected IQueryable ApplyGenericWheres<X>(IQueryable items, IEnumerable<Expression<Func<X, bool>>> wheres)
Parameters
Returns
Type Parameters
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
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
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)
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
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
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
GetAsSingleFilter()
Declaration
public Expression<Func<T, bool>> GetAsSingleFilter()
Returns
GetFilters()
Returns the Where filters in this QueryableExecuter as Linq Expressions typed to type T
Declaration
public IEnumerable<Expression<Func<T, bool>>> GetFilters()
Returns
OrderBy(string, Order)
Declaration
public QueryableExecuter<T> OrderBy(string propName, Order direction)
Parameters
Returns
Skip(int)
Declaration
public QueryableExecuter<T> Skip(int count)
Parameters
Type |
Name |
Description |
int |
count |
|
Returns
Top(int)
Declaration
public QueryableExecuter<T> Top(int count)
Parameters
Type |
Name |
Description |
int |
count |
|
Returns
Where(QueryableFilter)
Declaration
public QueryableExecuter<T> Where(QueryableFilter filter)
Parameters
Returns
Where(string, SQLOperator, object)
Declaration
public QueryableExecuter<T> Where(string propName, SQLOperator op, object value)
Parameters
Returns
Where(string, string, SQLOperator)
Declaration
public QueryableExecuter<T> Where(string propName, string propName2, SQLOperator op)
Parameters
Returns
Implements
Extension Methods
See Also