Пример #1
0
 public override string Render(Evaluant.NLinq.Expressions.Expression expression)
 {
     type = SqlExpressions.DbExpressionType.Unknown;
     TraceHelper.TraceEvent(SqlMapperProvider.TraceSource, System.Diagnostics.TraceEventType.Start, 1, "Rendering");
     string sql = base.Render(expression);
     TraceHelper.TraceEvent(SqlMapperProvider.TraceSource, System.Diagnostics.TraceEventType.Stop, 1, "Rendering");
     TraceHelper.TraceData(SqlMapperProvider.TraceSource, System.Diagnostics.TraceEventType.Information, (int)type, sql);
     return sql;
 }
Пример #2
0
        public override string Render(SqlExpressions.IDbExpression expression)
        {
            type = Evaluant.Uss.SqlExpressions.DbExpressionType.Unknown;
            TraceHelper.TraceEvent(SqlMapperProvider.TraceSource, System.Diagnostics.TraceEventType.Start, 1, "Rendering");
            string sql = base.Render(expression);
            TraceHelper.TraceEvent(SqlMapperProvider.TraceSource, System.Diagnostics.TraceEventType.Stop, 1, "Rendering");
            TraceHelper.TraceData(SqlMapperProvider.TraceSource, System.Diagnostics.TraceEventType.Information, (int)type, sql);
#if TRACE
            SqlExpressions.IDbStatement statement = expression as SqlExpressions.IDbStatement;
            if (statement != null)
            {
                foreach (SqlExpressions.ValuedParameter parameter in statement.Parameters.Values)
                    TraceHelper.TraceData(SqlMapperProvider.TraceSource, System.Diagnostics.TraceEventType.Information, (int)type, parameter.Name + "=" + parameter.Value);
            }
#endif
            return sql;
        }
Пример #3
0
 protected override SqlExpressions.IDbExpression Visit(Evaluant.Uss.SqlExpressions.IDbExpression exp)
 {
     if (type == SqlExpressions.DbExpressionType.Unknown)
         type = exp.DbExpressionType;
     return base.Visit(exp);
 }