protected override void OnValidate() { var orders = _orderService.GetByCustomerCommand(_customerID).Execute().Value; if (orders.Any()) { Invalidate("This customer is associated with one or more orders and cannot be deleted."); } }