public override DbExpression Visit(DbArithmeticExpression expression) { Check.NotNull(expression, "expression"); DbExpression result = expression; var newArguments = VisitExpressionList(expression.Arguments); if (!ReferenceEquals(expression.Arguments, newArguments)) { switch (expression.ExpressionKind) { case DbExpressionKind.Divide: result = CqtBuilder.Divide(newArguments[0], newArguments[1]); break; case DbExpressionKind.Minus: result = CqtBuilder.Minus(newArguments[0], newArguments[1]); break; case DbExpressionKind.Modulo: result = CqtBuilder.Modulo(newArguments[0], newArguments[1]); break; case DbExpressionKind.Multiply: result = CqtBuilder.Multiply(newArguments[0], newArguments[1]); break; case DbExpressionKind.Plus: result = CqtBuilder.Plus(newArguments[0], newArguments[1]); break; case DbExpressionKind.UnaryMinus: result = CqtBuilder.UnaryMinus(newArguments[0]); break; default: throw new NotSupportedException(); } } NotifyIfChanged(expression, result); return(result); }