public void Visit_DbIntersectExpression_creates_equivalent_legacy_DbIntersectExpression()
        {
            var left  = DbExpressionBuilder.NewCollection(new DbExpression[] { DbExpressionBuilder.Constant(42) });
            var right = DbExpressionBuilder.NewCollection(new DbExpression[] { DbExpressionBuilder.Constant(24) });

            var intersectExpression = left.Intersect(right);

            var legacyIntersectExpression =
                _legacyDbExpressionConverter.Visit(intersectExpression) as LegacyCommandTrees.DbIntersectExpression;

            Assert.NotNull(legacyIntersectExpression);
            Assert.Equal(LegacyCommandTrees.DbExpressionKind.Intersect, legacyIntersectExpression.ExpressionKind);

            Assert.Equal(
                42,
                ((LegacyCommandTrees.DbConstantExpression)
                     ((LegacyCommandTrees.DbNewInstanceExpression)legacyIntersectExpression.Left).Arguments.Single())
                .Value);

            Assert.Equal(
                24,
                ((LegacyCommandTrees.DbConstantExpression)
                     ((LegacyCommandTrees.DbNewInstanceExpression)legacyIntersectExpression.Right).Arguments.Single())
                .Value);

            TypeUsageVerificationHelper
            .VerifyTypeUsagesEquivalent(legacyIntersectExpression.ResultType, intersectExpression.ResultType);
        }
            internal static CqtExpression StripNull(LinqExpression sourceExpression,
                                                    DbExpression inputExpression, DbExpression outputExpression, bool useDatabaseNullSemantics)
            {
                if (sourceExpression.IsNullConstant())
                {
                    return(DbExpressionBuilder.Constant(string.Empty));
                }

                if (sourceExpression.NodeType == ExpressionType.Constant)
                {
                    return(outputExpression);
                }

                if (useDatabaseNullSemantics)
                {
                    return(outputExpression);
                }

                // converts evaluated null values to empty string, nullable primitive properties etc.
                var castNullToEmptyString = DbExpressionBuilder.Case(
                    new[] { inputExpression.IsNull() },
                    new[] { DbExpressionBuilder.Constant(string.Empty) },
                    outputExpression);

                return(castNullToEmptyString);
            }
Beispiel #3
0
        private void MapStartsWithExpression(MethodCallExpression expression)
        {
            if ((expression.Arguments == null) || (expression.Arguments.Count != 1))
            {
                throw new ApplicationException("Did not find exactly 1 Argument to StartsWith function");
            }

            DbExpression srcExpression = GetDbExpressionForExpression(expression.Object);

            DbExpression dbExpression;

            if (expression.Arguments[0] is ConstantExpression)
            {
                var constantExpression = GetDbExpressionForExpression(expression.Arguments[0]) as DbConstantExpression;
                if ((constantExpression == null) || (constantExpression.Value == null))
                {
                    throw new NullReferenceException("Parameter to StartsWith cannot be null");
                }

                dbExpression = DbExpressionBuilder.Like(srcExpression, DbExpressionBuilder.Constant(constantExpression.Value.ToString() + "%"));
            }
            else
            {
                var argExpression = GetDbExpressionForExpression(expression.Arguments[0]);

                //  Note: Can also do this using StartsWith function on srcExpression (which avoids having to hardcode the % character).
                //  It works but generates some crazy conditions using charindex which I don't think will use indexes as well as "like"...
                //dbExpression = DbExpressionBuilder.Equal(DbExpressionBuilder.True, srcExpression.StartsWith(argExpression));

                dbExpression = DbExpressionBuilder.Like(srcExpression, argExpression.Concat(DbExpressionBuilder.Constant("%")));
            }

            MapExpressionToDbExpression(expression, dbExpression);
        }
        public void Visit_DbFitlerExpression_creates_equivalent_legacy_DbFilterExpression()
        {
            var scanExpression =
                _storeItemCollection
                .GetEntityContainer("AdventureWorksModelStoreContainer")
                .EntitySets.Single(e => e.Name == "EntitiesSet")
                .Scan();

            var filterExpression =
                scanExpression
                .BindAs("Table")
                .Filter(
                    DbExpressionBuilder.Constant(911).Equal(DbExpressionBuilder.Constant(911)));

            var legacyFilterExpression =
                _legacyDbExpressionConverter.Visit(filterExpression) as LegacyCommandTrees.DbFilterExpression;

            Assert.NotNull(legacyFilterExpression);
            Assert.Equal(LegacyCommandTrees.DbExpressionKind.Filter, legacyFilterExpression.ExpressionKind);
            Assert.Equal(LegacyCommandTrees.DbExpressionKind.Scan, legacyFilterExpression.Input.Expression.ExpressionKind);
            Assert.Equal(LegacyCommandTrees.DbExpressionKind.Equals, legacyFilterExpression.Predicate.ExpressionKind);

            TypeUsageVerificationHelper
            .VerifyTypeUsagesEquivalent(legacyFilterExpression.ResultType, filterExpression.ResultType);
        }
        private DbConstantExpression CreateConstantExpression(object value)
        {
            //  This is not currently supported (DbExpressionBuilder.Constant throws exceptions).  But, DbConstant has
            //  other constructors available that do take nullable types.  Maybe those would work.
            if (value == null)
            {
                throw new ApplicationException("null is not convertable to a DbConstantExpression");
            }

            if (_DataSpace == DataSpace.CSpace)
            {
                //  Must create the constant using a TypeUsage to handle Enum types.
                var typeUsage = TypeUsageForPrimitiveType(value.GetType());
                return(DbExpressionBuilder.Constant(typeUsage, value));
            }
            else
            {
                //  Must map Enums to an int or EF/SQL will not know what to do with them.
                if (value.GetType().IsEnum)
                {
                    return(DbExpressionBuilder.Constant((int)value));
                }

                return(DbExpressionBuilder.Constant(value));
            }
        }
        public void Visit_DbNewInstanceExpression_rowtype_creates_equivalent_legacy_DbNewInstanceExpression()
        {
            var propertyExpression =
                TypeUsage
                .CreateDefaultTypeUsage(
                    _storeItemCollection.GetItems <EntityType>().Single(e => e.Name == "Entities"))
                .Variable("Table")
                .Property("Id");

            var newInstanceExpressionRowType =
                DbExpressionBuilder.NewRow(
                    new[]
            {
                new KeyValuePair <string, DbExpression>("Id", propertyExpression),
                new KeyValuePair <string, DbExpression>("Const", DbExpressionBuilder.Constant(42))
            });

            var legacyNewInstanceExpressionRowType =
                _legacyDbExpressionConverter.Visit(newInstanceExpressionRowType) as
                LegacyCommandTrees.DbNewInstanceExpression;

            Assert.NotNull(legacyNewInstanceExpressionRowType);
            Assert.Equal(
                LegacyCommandTrees.DbExpressionKind.NewInstance,
                legacyNewInstanceExpressionRowType.ExpressionKind);
            Assert.Equal(2, legacyNewInstanceExpressionRowType.Arguments.Count);
            Assert.IsType <LegacyCommandTrees.DbPropertyExpression>(legacyNewInstanceExpressionRowType.Arguments[0]);
            Assert.IsType <LegacyCommandTrees.DbConstantExpression>(legacyNewInstanceExpressionRowType.Arguments[1]);

            TypeUsageVerificationHelper
            .VerifyTypeUsagesEquivalent(legacyNewInstanceExpressionRowType.ResultType, newInstanceExpressionRowType.ResultType);
        }
        public void Visit_DbSkipExpression_creates_equivalent_legacy_DbSkipExpression()
        {
            var scanExpression =
                _storeItemCollection
                .GetEntityContainer("AdventureWorksModelStoreContainer")
                .EntitySets.Single(e => e.Name == "EntitiesSet")
                .Scan();

            var idProperty =
                TypeUsage
                .CreateDefaultTypeUsage(
                    _storeItemCollection.GetItems <EntityType>().Single(e => e.Name == "Entities"))
                .Variable("Table")
                .Property("Id");

            var skipExpression =
                scanExpression
                .BindAs("Table")
                .Skip(new[] { idProperty.ToSortClause() }, DbExpressionBuilder.Constant(42));

            var legacySkipExpression =
                _legacyDbExpressionConverter.Visit(skipExpression) as LegacyCommandTrees.DbSkipExpression;

            Assert.NotNull(legacySkipExpression);
            Assert.Equal(LegacyCommandTrees.DbExpressionKind.Skip, legacySkipExpression.ExpressionKind);
            Assert.Equal("Table", legacySkipExpression.Input.VariableName);
            Assert.Equal(LegacyCommandTrees.DbExpressionKind.Scan, legacySkipExpression.Input.Expression.ExpressionKind);
            Assert.Equal(
                "Id",
                ((LegacyCommandTrees.DbPropertyExpression)legacySkipExpression.SortOrder.Single().Expression).Property.Name);
            Assert.Equal(42, ((LegacyCommandTrees.DbConstantExpression)legacySkipExpression.Count).Value);
            TypeUsageVerificationHelper
            .VerifyTypeUsagesEquivalent(legacySkipExpression.ResultType, skipExpression.ResultType);
        }
Beispiel #8
0
        public static DbExpression Convert(DynamicFilterDefinition filter, DbExpressionBinding binding, DbContext dbContext, DataSpace dataSpace)
        {
            var visitor    = new LambdaToDbExpressionVisitor(filter, binding, dbContext, dataSpace);
            var expression = visitor.Visit(filter.Predicate) as LambdaExpression;

            var dbExpression = visitor.GetDbExpressionForExpression(expression.Body);

            if (dbExpression is DbPropertyExpression)
            {
                //  Special case to handle a condition that is just a plain "boolFlag" or a nullable generic condition.
                //  For a nullable type, we only get here when the filter has either not specified a value for the nullable
                //  parameter or it has specified "null" - both evaluate the same as far as the method prototypes can tell
                //  since the method signature is "param = null".  This needs to generate a sql "is null" condition.
                //  Otherwise, no param value was specified so we are assuming that we need to generate a "positive"
                //  condition.  i.e. the filter just said "b.prop" which generally means "b.prop == true".
                //  To generate that condition correctly for all types (may not necessarily be a bool), we create a condition
                //  like "!(b.prop == [defaultValue])"

                if (IsNullableType(expression.Body.Type))
                {
                    dbExpression = DbExpressionBuilder.IsNull(dbExpression);
                }
                else
                {
                    var defaultValue = DbExpressionBuilder.Constant(dbExpression.ResultType, Activator.CreateInstance(expression.Body.Type));
                    dbExpression = DbExpressionBuilder.Not(DbExpressionBuilder.Equal(dbExpression, defaultValue));
                }
            }

            return(dbExpression);
        }
Beispiel #9
0
        public void IsQuery_false_for_non_DbQueryCommandTree()
        {
            var collectionExpression =
                TypeUsage.CreateDefaultTypeUsage(
                    PrimitiveType.GetEdmPrimitiveType(PrimitiveTypeKind.String)
                    .GetCollectionType())
                .NewEmptyCollection();

            var commandTrees = new DbCommandTree[]
            {
                new DbInsertCommandTree(
                    new MetadataWorkspace(),
                    DataSpace.CSpace,
                    collectionExpression.Bind(),
                    new List <DbModificationClause>().AsReadOnly(),
                    collectionExpression),

                new DbUpdateCommandTree(
                    new MetadataWorkspace(),
                    DataSpace.CSpace,
                    collectionExpression.Bind(),
                    DbExpressionBuilder.Constant(3),
                    new List <DbModificationClause>().AsReadOnly(),
                    collectionExpression),
            };

            foreach (var commandTree in commandTrees)
            {
                Assert.False(new CommandTreeFacts(commandTree).IsQuery);
            }
        }
Beispiel #10
0
 /// <summary>
 /// Creates a <see cref="T:System.Data.Entity.Core.Common.CommandTrees.DbExpression" /> that represents the specified string value.
 /// </summary>
 /// <returns>
 /// A <see cref="T:System.Data.Entity.Core.Common.CommandTrees.DbExpression" /> that represents the specified string value.
 /// </returns>
 /// <param name="value">The string value on which the returned expression should be based.</param>
 public static DbExpression FromString(string value)
 {
     if (value == null)
     {
         return((DbExpression)DbExpressionBuilder.CreatePrimitiveNullExpression(PrimitiveTypeKind.String));
     }
     return((DbExpression)DbExpressionBuilder.Constant((object)value));
 }
Beispiel #11
0
 /// <summary>
 /// Creates a <see cref="T:System.Data.Entity.Core.Common.CommandTrees.DbExpression" /> that represents the specified (nullable) Single value.
 /// </summary>
 /// <returns>
 /// A <see cref="T:System.Data.Entity.Core.Common.CommandTrees.DbExpression" /> that represents the specified Single value.
 /// </returns>
 /// <param name="value">The Single value on which the returned expression should be based.</param>
 public static DbExpression FromSingle(float?value)
 {
     if (!value.HasValue)
     {
         return((DbExpression)DbExpressionBuilder.CreatePrimitiveNullExpression(PrimitiveTypeKind.Single));
     }
     return((DbExpression)DbExpressionBuilder.Constant((object)value.Value));
 }
Beispiel #12
0
 /// <summary>
 /// Creates a <see cref="T:System.Data.Entity.Core.Common.CommandTrees.DbExpression" /> that represents the specified (nullable) Int64 value.
 /// </summary>
 /// <returns>
 /// A <see cref="T:System.Data.Entity.Core.Common.CommandTrees.DbExpression" /> that represents the specified Int64 value.
 /// </returns>
 /// <param name="value">The Int64 value on which the returned expression should be based.</param>
 public static DbExpression FromInt64(long?value)
 {
     if (!value.HasValue)
     {
         return((DbExpression)DbExpressionBuilder.CreatePrimitiveNullExpression(PrimitiveTypeKind.Int64));
     }
     return((DbExpression)DbExpressionBuilder.Constant((object)value.Value));
 }
Beispiel #13
0
 /// <summary>
 /// Creates a <see cref="T:System.Data.Entity.Core.Common.CommandTrees.DbExpression" /> that represents the specified
 /// <see cref="T:System.Data.Entity.Spatial.DbGeometry" />
 /// value, which may be null.
 /// </summary>
 /// <returns>
 /// A <see cref="T:System.Data.Entity.Core.Common.CommandTrees.DbExpression" /> that represents the specified DbGeometry value.
 /// </returns>
 /// <param name="value">The DbGeometry value on which the returned expression should be based.</param>
 public static DbExpression FromGeometry(DbGeometry value)
 {
     if (value == null)
     {
         return((DbExpression)DbExpressionBuilder.CreatePrimitiveNullExpression(PrimitiveTypeKind.Geometry));
     }
     return((DbExpression)DbExpressionBuilder.Constant((object)value));
 }
        public void GeometryFromBinary_produces_correct_EdmFunction()
        {
            var argument = DbExpressionBuilder.Constant(new byte[] { 0x00, 0x01 });
            var function = SpatialEdmFunctions.GeometryFromBinary(argument);

            Assert.Equal("GeometryFromBinary", function.Function.FunctionName);
            Assert.Same(argument, function.Arguments[0]);
        }
        private void UnarySpatialFunctionsHelper(Func <DbExpression, DbFunctionExpression> operation, string functionName)
        {
            var argument = DbExpressionBuilder.Constant(DbGeometry.FromText("POINT(1 1)"));
            var function = operation(argument);

            Assert.Equal(functionName, function.Function.FunctionName);
            Assert.Same(argument, function.Arguments[0]);
        }
Beispiel #16
0
 /// <summary>
 /// Creates a <see cref="T:System.Data.Entity.Core.Common.CommandTrees.DbExpression" /> that represents the specified binary value, which may be null
 /// </summary>
 /// <returns>
 /// A <see cref="T:System.Data.Entity.Core.Common.CommandTrees.DbExpression" /> that represents the specified binary value.
 /// </returns>
 /// <param name="value">The binary value on which the returned expression should be based.</param>
 public static DbExpression FromBinary(byte[] value)
 {
     if (value == null)
     {
         return((DbExpression)DbExpressionBuilder.CreatePrimitiveNullExpression(PrimitiveTypeKind.Binary));
     }
     return((DbExpression)DbExpressionBuilder.Constant((object)value));
 }
Beispiel #17
0
 /// <summary>
 /// Creates a <see cref="T:System.Data.Entity.Core.Common.CommandTrees.DbExpression" /> that represents the specified (nullable)
 /// <see
 ///     cref="T:System.Guid" />
 /// value.
 /// </summary>
 /// <returns>
 /// A <see cref="T:System.Data.Entity.Core.Common.CommandTrees.DbExpression" /> that represents the specified Guid value.
 /// </returns>
 /// <param name="value">The Guid value on which the returned expression should be based.</param>
 public static DbExpression FromGuid(Guid?value)
 {
     if (!value.HasValue)
     {
         return(DbExpressionBuilder.CreatePrimitiveNullExpression(PrimitiveTypeKind.Guid));
     }
     return(DbExpressionBuilder.Constant(value.Value));
 }
Beispiel #18
0
 /// <summary>
 /// Creates a <see cref="T:System.Data.Entity.Core.Common.CommandTrees.DbExpression" /> that represents the specified
 /// <see
 ///     cref="T:System.Data.Entity.Spatial.DbGeography" />
 /// value, which may be null.
 /// </summary>
 /// <returns>
 /// A <see cref="T:System.Data.Entity.Core.Common.CommandTrees.DbExpression" /> that represents the specified DbGeography value.
 /// </returns>
 /// <param name="value">The DbGeography value on which the returned expression should be based.</param>
 public static DbExpression FromGeography(DbGeography value)
 {
     if (value == null)
     {
         return(DbExpressionBuilder.CreatePrimitiveNullExpression(PrimitiveTypeKind.Geography));
     }
     return(DbExpressionBuilder.Constant(value));
 }
Beispiel #19
0
 /// <summary>
 /// Creates a <see cref="T:System.Data.Entity.Core.Common.CommandTrees.DbExpression" /> that represents the specified (nullable)
 /// <see
 ///     cref="T:System.DateTime" />
 /// value.
 /// </summary>
 /// <returns>
 /// A <see cref="T:System.Data.Entity.Core.Common.CommandTrees.DbExpression" /> that represents the specified DateTime value.
 /// </returns>
 /// <param name="value">The DateTime value on which the returned expression should be based.</param>
 public static DbExpression FromDateTime(DateTime?value)
 {
     if (!value.HasValue)
     {
         return(DbExpressionBuilder.CreatePrimitiveNullExpression(PrimitiveTypeKind.DateTime));
     }
     return(DbExpressionBuilder.Constant(value.Value));
 }
Beispiel #20
0
 /// <summary>
 /// Creates a <see cref="T:System.Data.Entity.Core.Common.CommandTrees.DbExpression" /> that represents the specified binary value, which may be null
 /// </summary>
 /// <returns>
 /// A <see cref="T:System.Data.Entity.Core.Common.CommandTrees.DbExpression" /> that represents the specified binary value.
 /// </returns>
 /// <param name="value">The binary value on which the returned expression should be based.</param>
 public static DbExpression FromBinary(byte[] value)
 {
     if (null == value)
     {
         return(DbExpressionBuilder.CreatePrimitiveNullExpression(PrimitiveTypeKind.Binary));
     }
     return(DbExpressionBuilder.Constant(value));
 }
        public void GeographyFromText_produces_correct_EdmFunction()
        {
            var argument = DbExpressionBuilder.Constant("POINT(1 1)");
            var function = SpatialEdmFunctions.GeographyFromText(argument);

            Assert.Equal("GeographyFromText", function.Function.FunctionName);
            Assert.Same(argument, function.Arguments[0]);
        }
Beispiel #22
0
 /// <summary>
 /// Creates a <see cref="T:System.Data.Entity.Core.Common.CommandTrees.DbExpression" /> that represents the specified (nullable) Int32 value.
 /// </summary>
 /// <returns>
 /// A <see cref="T:System.Data.Entity.Core.Common.CommandTrees.DbExpression" /> that represents the specified Int32 value.
 /// </returns>
 /// <param name="value">The Int32 value on which the returned expression should be based.</param>
 public static DbExpression FromInt32(int?value)
 {
     if (!value.HasValue)
     {
         return(DbExpressionBuilder.CreatePrimitiveNullExpression(PrimitiveTypeKind.Int32));
     }
     return(DbExpressionBuilder.Constant(value.Value));
 }
        public void GeometryFromGml_produces_correct_EdmFunction()
        {
            var argument = DbExpressionBuilder.Constant("<gml>some GML</gml>");
            var function = SpatialEdmFunctions.GeometryFromGml(argument);

            Assert.Equal("GeometryFromGml", function.Function.FunctionName);
            Assert.Same(argument, function.Arguments[0]);
        }
Beispiel #24
0
 /// <summary>
 /// Creates a <see cref="T:System.Data.Entity.Core.Common.CommandTrees.DbExpression" /> that represents the specified string value.
 /// </summary>
 /// <returns>
 /// A <see cref="T:System.Data.Entity.Core.Common.CommandTrees.DbExpression" /> that represents the specified string value.
 /// </returns>
 /// <param name="value">The string value on which the returned expression should be based.</param>
 public static DbExpression FromString(string value)
 {
     if (null == value)
     {
         return(DbExpressionBuilder.CreatePrimitiveNullExpression(PrimitiveTypeKind.String));
     }
     return(DbExpressionBuilder.Constant(value));
 }
Beispiel #25
0
 /// <summary>
 /// Creates a <see cref="T:System.Data.Entity.Core.Common.CommandTrees.DbExpression" /> that represents the specified (nullable) decimal value.
 /// </summary>
 /// <returns>
 /// A <see cref="T:System.Data.Entity.Core.Common.CommandTrees.DbExpression" /> that represents the specified decimal value.
 /// </returns>
 /// <param name="value">The decimal value on which the returned expression should be based.</param>
 public static DbExpression FromDecimal(Decimal?value)
 {
     if (!value.HasValue)
     {
         return((DbExpression)DbExpressionBuilder.CreatePrimitiveNullExpression(PrimitiveTypeKind.Decimal));
     }
     return((DbExpression)DbExpressionBuilder.Constant((object)value.Value));
 }
Beispiel #26
0
 /// <summary>
 /// Creates a <see cref="T:System.Data.Entity.Core.Common.CommandTrees.DbExpression" /> that represents the specified (nullable)
 /// <see cref="T:System.DateTimeOffset" />
 /// value.
 /// </summary>
 /// <returns>
 /// A <see cref="T:System.Data.Entity.Core.Common.CommandTrees.DbExpression" /> that represents the specified DateTimeOffset value.
 /// </returns>
 /// <param name="value">The DateTimeOffset value on which the returned expression should be based.</param>
 public static DbExpression FromDateTimeOffset(DateTimeOffset?value)
 {
     if (!value.HasValue)
     {
         return((DbExpression)DbExpressionBuilder.CreatePrimitiveNullExpression(PrimitiveTypeKind.DateTimeOffset));
     }
     return((DbExpression)DbExpressionBuilder.Constant((object)value.Value));
 }
        /// <summary>
        ///     Implements the visitor pattern for a reference to a parameter declared on the command tree
        ///     that contains this expression.
        /// </summary>
        /// <param name="expression">The expression.</param>
        /// <returns>The implemented visitor.</returns>
        public override DbExpression Visit(DbParameterReferenceExpression expression)
        {
            if (ParameterCollection.Contains(expression.ParameterName))
            {
                return(DbExpressionBuilder.Constant(ParameterCollection[expression.ParameterName].Value));
            }

            return(base.Visit(expression));
        }
        public void GeometryFromGml_with_coordinate_id_produces_correct_EdmFunction()
        {
            var argument1 = DbExpressionBuilder.Constant("<gml>some GML</gml>");
            var argument2 = DbExpressionBuilder.Constant(1);
            var function  = SpatialEdmFunctions.GeometryFromGml(argument1, argument2);

            Assert.Equal("GeometryFromGml", function.Function.FunctionName);
            Assert.Same(argument1, function.Arguments[0]);
            Assert.Same(argument2, function.Arguments[1]);
        }
        private void SpatialFunctionWithIntegerArgumentHelper(
            Func <DbExpression, DbExpression, DbFunctionExpression> operation,
            string functionName)
        {
            var argument1 = DbExpressionBuilder.Constant(DbGeometry.FromText("POINT(1 1)"));
            var argument2 = DbExpressionBuilder.Constant(1);
            var function  = operation(argument1, argument2);

            Assert.Equal(functionName, function.Function.FunctionName);
            Assert.Same(argument1, function.Arguments[0]);
            Assert.Same(argument2, function.Arguments[1]);
        }
        public void Visit_DbComparisonExpression_can_handle_all_comparison_operations()
        {
            var a = DbExpressionBuilder.Constant(42);
            var b = DbExpressionBuilder.Constant(911);

            ConvertAndVerifyComparisonExpression(a.Equal(b));
            ConvertAndVerifyComparisonExpression(a.NotEqual(b));
            ConvertAndVerifyComparisonExpression(a.LessThan(b));
            ConvertAndVerifyComparisonExpression(a.LessThanOrEqual(b));
            ConvertAndVerifyComparisonExpression(a.GreaterThan(b));
            ConvertAndVerifyComparisonExpression(a.GreaterThanOrEqual(b));
        }