Exemple #1
0
 public BuilderContext(QueryContext queryContext)
 {
     CallStack         = new Stack <MethodInfo>();
     SelectExpressions = new List <SelectExpression>();
     currentScopeIndex = SelectExpressions.Count;
     SelectExpressions.Add(new SelectExpression());
     QueryContext    = queryContext;
     ExpressionQuery = new ExpressionQuery();
     MetaTables      = new Dictionary <Type, MetaTableExpression>();
     Parameters      = new Dictionary <string, Expression>();
 }
 public BuilderContext(QueryContext queryContext)
 {
     SelectExpressions = new List<SelectExpression>();
     currentScopeIndex = SelectExpressions.Count;
     SelectExpressions.Add(new SelectExpression());
     QueryContext = queryContext;
     ExpressionQuery = new ExpressionQuery();
     MetaTables = new Dictionary<Type, MetaTableExpression>();
     Parameters = new Dictionary<string, Expression>();
 }
 /// <summary>
 /// Builds a SQL string, based on a QueryContext
 /// The build indirectly depends on ISqlProvider which provides all SQL parts.
 /// </summary>
 /// <param name="expressionQuery"></param>
 /// <param name="queryContext"></param>
 /// <returns></returns>
 public string BuildSelect(ExpressionQuery expressionQuery, QueryContext queryContext)
 {
     return Build(expressionQuery.Select, queryContext);
 }