예제 #1
0
 private SqlExpression ApplyTypeMappingOnSqlConditional(
     SqlConditionalExpression sqlConditionalExpression, CoreTypeMapping typeMapping)
 {
     return(sqlConditionalExpression.Update(
                sqlConditionalExpression.Test,
                ApplyTypeMapping(sqlConditionalExpression.IfTrue, typeMapping),
                ApplyTypeMapping(sqlConditionalExpression.IfFalse, typeMapping)));
 }
예제 #2
0
        protected override Expression VisitSqlConditional(SqlConditionalExpression sqlConditionalExpression)
        {
            _sqlBuilder.Append("(");
            Visit(sqlConditionalExpression.Test);
            _sqlBuilder.Append(" ? ");
            Visit(sqlConditionalExpression.IfTrue);
            _sqlBuilder.Append(" : ");
            Visit(sqlConditionalExpression.IfFalse);
            _sqlBuilder.Append(")");

            return(sqlConditionalExpression);
        }
 protected abstract Expression VisitSqlConditional(SqlConditionalExpression caseExpression);