protected virtual void Where(TCriteria criteria) { var whereClauses = WhereClauseManager.Get(criteria, GetTableName(), GetAlias()); var dbArgs = new DynamicParameters(); foreach (var whereClause in whereClauses) { if (!whereClause.WithoutValue) { dbArgs.Add(whereClause.ParameterName, whereClause.ParameterValue); } Builder.Where(whereClause.Sql); } Builder.AddParameters(dbArgs); }
static QueryBuilder() { WhereClauseManager = new WhereClauseManager(new WhereAttributeManager()); JoinClauseManager = new JoinClauseManager(new JoinClauseCreatorFactory()); SelectClauseManager = new SelectClauseManager(); }