Пример #1
0
        private void SetOrderBy(Expression aiExp)
        {
            var itemstr = ExpressionWriterSql.BizWhereWriteToString(aiExp, SqlType.Order);

            if (string.IsNullOrWhiteSpace(_aiOrderByStr))
            {
                _aiOrderByStr = itemstr;
            }
            else
            {
                _aiOrderByStr = _aiOrderByStr + "," + itemstr;
            }
        }
Пример #2
0
        private void SetWhere(Expression aiExp, LambdaExpUnion bizUion = LambdaExpUnion.And)
        {
            var itemstr = ExpressionWriterSql.BizWhereWriteToString(aiExp, SqlType.Where);

            if (string.IsNullOrWhiteSpace(_aiWhereStr))
            {
                _aiWhereStr = itemstr;
            }
            else
            {
                if (bizUion == LambdaExpUnion.Or)
                {
                    _aiWhereStr = _aiWhereStr + " Or " + itemstr;
                }
                else
                {
                    _aiWhereStr = _aiWhereStr + " And " + itemstr;
                }
            }
        }