Remotion.Linq.SqlBackend.MappingResolution.SqlContextExpressionVisitor.HandleValueSemantics C# (CSharp) Method

HandleValueSemantics() private method

private HandleValueSemantics ( Expression expression ) : Expression
expression System.Linq.Expressions.Expression
return System.Linq.Expressions.Expression
    private Expression HandleValueSemantics (Expression expression)
    {
      var newExpression = base.VisitExpression (expression);
      if (newExpression is SqlConvertedBooleanExpression)
        return newExpression;

      // We don't adjust the results of local method calls, every value is a supported value here. This is a workaround, better solution in RM-5348.
      if (newExpression is MethodCallExpression)
        return newExpression;

      if (BooleanUtility.IsBooleanType (newExpression.Type))
      {
        var convertedExpression = CreateValueExpressionForPredicate (newExpression);
        return new SqlConvertedBooleanExpression (convertedExpression);
      }
      else
      {
        return newExpression;
      }
    }