No, it is not okay to inject repositories into domain objects :)
What is acceptable, but only if there really is no other way, is to pass in repositories or other domain objects such as services into an AR method to perform some function via the double-dispatch method:
public void ApplyDiscount(IDiscountService service)
{
_discount = service.Discount(customerType);
}
As I have mentioned in other posts, I tend to think of an AR as I would a physical calculator. There is input, via the keypad, and there is output, via the screen. While the calculator is doing its voodoo it doesn't interact with anything else and doesn't ask for additional information. That being said, there are probably going to be exceptions as in the example above but I guess the discount could be determined by the operation script (service layer):
public void RegisterOrderTask
{
private IDiscountService _discountService;
private IOrderRepository _orderRepository;
public void RegisterOrderTask(IDiscountService discountService, IOrderRepository orderRepository)
{
_discountService = discountService;
_orderRepository = orderRepository;
}
public void Execute(OrderDetails details)
{
_orderRepository
.Add(details.CreateOrder()
.SetDiscount(_disocuntService.Discount(details.CustomerType)));
}
}
These are just some made up ideas but may get you thinking about your scenario :)