Пример #1
0
        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);
        }
Пример #2
0
 static QueryBuilder()
 {
     WhereClauseManager  = new WhereClauseManager(new WhereAttributeManager());
     JoinClauseManager   = new JoinClauseManager(new JoinClauseCreatorFactory());
     SelectClauseManager = new SelectClauseManager();
 }