Highway Framework  Release 1.0.1.0
The fastest and smoothest way to great architecture
 All Classes Namespaces Functions Variables Properties Events
Public Member Functions | Protected Member Functions | Properties
Highway.Data.QueryObjects.Query< T > Class Template Reference

The base implementation for Queries that return collections More...

Inheritance diagram for Highway.Data.QueryObjects.Query< T >:
Highway.Data.QueryObjects.QueryBase Highway.Data.Interfaces.IQuery< out T > Highway.Data.Interfaces.IExtendableQuery Highway.Data.Interfaces.IObservableQuery Highway.Data.Interfaces.IQueryBase Highway.Data.EntityFramework.StructureMap.Example.Queries.LastNameQuery

List of all members.

Public Member Functions

virtual IEnumerable< T > Execute (IDataContext context)
 This executes the expression in ContextQuery on the context that is passed in, resulting in a IQueryable{T} that is returned as an IEnumerable{T}
string OutputSQLStatement (IDataContext context)
 This executes the expression against the passed in context to generate the SQL statement, but doesn't execute the IQueryableT against the data context
- Public Member Functions inherited from Highway.Data.QueryObjects.QueryBase
void AddMethodExpression (string methodName, Type[] generics, Expression[] parameters)
 Adds a method to the expression in the query object

Protected Member Functions

virtual IQueryable< T > ExtendQuery ()
 This method allows for the extension of Ordering and Grouping on the prebuild Query
IQueryable< T > AppendExpressions (IQueryable< T > query)
 Gives the ability to apend an IQueryable onto the current query
- Protected Member Functions inherited from Highway.Data.QueryObjects.QueryBase
void CheckContextAndQuery (object query)
 Checks the context and the Query for null

Properties

Func< IDataContext, IQueryable
< T > > 
ContextQuery [get, set]
 This holds the expression that will be used to create the IQueryable{T} when executed on the context
- Properties inherited from Highway.Data.QueryObjects.QueryBase
IDataContext Context [get, set]
 The reference to the IDataContext that gives data connection

Additional Inherited Members

- Protected Attributes inherited from Highway.Data.QueryObjects.QueryBase
List< Tuple< MethodInfo,
Expression[]> > 
ExpressionList = new List<Tuple<MethodInfo, Expression[]>>()
 Holds the expressions to be appended
- Events inherited from Highway.Data.QueryObjects.QueryBase
EventHandler< PreQueryEventArgsPreQuery
 The event fired just before the query goes to the database
EventHandler< PostQueryEventArgsPostQuery
 The event fire just after the data is translated into objects but before the data is returned.
- Events inherited from Highway.Data.Interfaces.IObservableQuery

Detailed Description

The base implementation for Queries that return collections

Template Parameters:
TThe Type being requested

Member Function Documentation

template<T >
IQueryable<T> Highway.Data.QueryObjects.Query< T >.AppendExpressions ( IQueryable< T >  query)
inlineprotected

Gives the ability to apend an IQueryable onto the current query

Parameters:
queryThe query containing the expressions to append
Returns:
The combined query
template<T >
virtual IEnumerable<T> Highway.Data.QueryObjects.Query< T >.Execute ( IDataContext  context)
inlinevirtual

This executes the expression in ContextQuery on the context that is passed in, resulting in a IQueryable{T} that is returned as an IEnumerable{T}

Parameters:
contextthe data context that the query should be executed against
Returns:
IEnumerable{T}

Implements Highway.Data.Interfaces.IQuery< out T >.

template<T >
virtual IQueryable<T> Highway.Data.QueryObjects.Query< T >.ExtendQuery ( )
inlineprotectedvirtual

This method allows for the extension of Ordering and Grouping on the prebuild Query

Returns:
an IQueryable{T}
template<T >
string Highway.Data.QueryObjects.Query< T >.OutputSQLStatement ( IDataContext  context)
inline

This executes the expression against the passed in context to generate the SQL statement, but doesn't execute the IQueryableT against the data context

Parameters:
contextThe data context that the query is evaluated and the SQL is generated against
Returns:

Implements Highway.Data.Interfaces.IQueryBase.


Property Documentation

template<T >
Func<IDataContext, IQueryable<T> > Highway.Data.QueryObjects.Query< T >.ContextQuery
getsetprotected

This holds the expression that will be used to create the IQueryable{T} when executed on the context


The documentation for this class was generated from the following file: