Beispiel #1
0
        protected override void Initialise()
        {
            var whereClauseGroup = new WhereClauseGroup();

            whereClauseGroup.GroupType = WhereClauseGroupType.Where;
            rootGroup    = whereClauseGroup;
            currentGroup = rootGroup;
        }
Beispiel #2
0
        protected override IWhereClauseBuilder AddNestedGroupToCurrentGroup <TEntity>(
            Expression <Func <TEntity, bool> > expression,
            WhereClauseGroupType groupType,
            string alias       = null,
            string tableName   = null,
            string tableSchema = null)
        {
            ThrowIfNotInitialised();
            var whereClauseGroup1 = new WhereClauseGroup();

            whereClauseGroup1.GroupType = groupType;
            whereClauseGroup1.Parent    = currentGroup;
            var whereClauseGroup2 = whereClauseGroup1;

            currentGroup.Groups.Add(whereClauseGroup2);
            currentGroup = whereClauseGroup2;
            return(AddConditionToCurrentGroup(expression, LogicalOperator.NotSet, alias, tableName, tableSchema));
        }