public void ShouldCreateEqualExpression()
        {
            var factory = new DbExpressionFactory();
            DbBinaryExpression binaryExpression;

            binaryExpression = factory.Equal(factory.Constant(1), factory.Constant(2));
            ValidateBinaryExpression(binaryExpression, DbBinaryExpressionType.Equal);
        }
 public void ShouldCreateEqualExpression()
 {
     var factory = new DbExpressionFactory();
     DbBinaryExpression binaryExpression;
     binaryExpression = factory.Equal(factory.Constant(1), factory.Constant(2));
     ValidateBinaryExpression(binaryExpression, DbBinaryExpressionType.Equal);
 }
예제 #3
0
 /// <summary>
 /// Implements the operator ==.
 /// </summary>
 /// <param name="leftExpression">The left expression.</param>
 /// <param name="rightExpression">The right expression.</param>
 /// <returns>A <see cref="DbExpression"/> instance.</returns>
 public static DbExpression operator ==(DbExpression leftExpression, DbExpression rightExpression)
 {
     return(ExpressionFactory.Equal(
                leftExpression.IsNull() ? ExpressionFactory.Constant(null) : leftExpression,
                rightExpression.IsNull() ? ExpressionFactory.Constant(null) : rightExpression));
 }