Пример #1
0
        internal static string WithExpression <T>(params Expression <Func <T, object> >[] columns)
        {
            var _columns =
                ExpressionHelper.GetExpressionPropertyNames(columns)
                .Select(e => e.AddSqlBrackets())
                .Aggregate((c, n) => c + "," + n);

            return(string.Concat("(", _columns, ")", " "));
        }
Пример #2
0
        internal static string WithExpression <T>(params Expression <Func <T, object> >[] columns)
        {
            var _columns = ExpressionHelper.GetExpressionPropertyNames(columns);

            return(_columns.Append(Constants.Sql.Distinct));
        }
Пример #3
0
        internal static string WithParamsExpression <T>(params Expression <Func <T, object> >[] columns)
        {
            var expression = ExpressionHelper.GetExpressionPropertyNames(columns).Select(e => e.AddSqlBrackets()).Aggregate((c, n) => c + "," + n);

            return(string.Concat(Constants.Sql.GroupBy, expression, " "));
        }
Пример #4
0
        internal static string WithExpression <T>(int top, bool percent, params Expression <Func <T, object> >[] columns)
        {
            var _columns = ExpressionHelper.GetExpressionPropertyNames(columns).Select(e => e.AddSqlBrackets()).ToList();

            return(string.Concat(Constants.Sql.Top, top, " ", percent ? Constants.Sql.Percent : "", _columns.Aggregate((c, n) => c + "," + n), " "));
        }
Пример #5
0
        internal static string WithExpression <T>(params Expression <Func <T, object> >[] columns)
        {
            var _columns = ExpressionHelper.GetExpressionPropertyNames(columns);

            return(SetInsertedColumns(_columns));
        }