Пример #1
0
        internal static string WithExpression <T, K>(Expression <Func <T, object> > TCondition,
                                                     Expression <Func <K, object> > KCondition)
        {
            var tcondition = ExpressionHelper.GetExpressionPropertyName(TCondition);
            var kcondition = ExpressionHelper.GetExpressionPropertyName(KCondition);

            var tType = typeof(T).Name;
            var kType = typeof(K).Name;

            return(string.Concat(Constants.Sql.On, tType, ".", tcondition, " = ", kType, ".", kcondition, " "));
        }
Пример #2
0
 internal static string WithExpression <T>(Expression <Func <T, object> > expression)
 {
     return(string.Concat(Constants.Sql.Then,
                          ExpressionHelper.GetExpressionPropertyName(expression).SetSqlValueWithQuoteOrWithoutQuote(), " "));
 }
Пример #3
0
        internal static string WithExpression <T>(Expression <Func <T, object> > column)
        {
            var expression = ExpressionHelper.GetExpressionPropertyName(column);

            return(string.Concat(Constants.Sql.GroupBy, expression.AddSqlBrackets(), " "));
        }
Пример #4
0
        internal static string WihtExpression <T>(Expression <Func <T, object> > column, SqlDbType sqlDbType, bool canBeNull)
        {
            var _column = ExpressionHelper.GetExpressionPropertyName(column).AddSqlBrackets();

            return(string.Concat(Constants.Sql.Add, _column, " ", sqlDbType, " ", canBeNull ? Constants.Sql.Null : Constants.Sql.NotNull));
        }