/// <summary>
        /// Fetches the orders using a prefetch path for order details.
        /// </summary>
        private void FetchOrders()
        {
            DataAccessAdapter adapter = new DataAccessAdapter();
            IPrefetchPath2    orderDetailsPrefetchPath = new PrefetchPath2((int)EntityType.OrderEntity);

            orderDetailsPrefetchPath.Add(OrderEntity.PrefetchPathOrderDetails);
            adapter.FetchEntityCollection(_currentCustomer.Orders, _currentCustomer.GetRelationInfoOrders(), 0, _orderSorter, orderDetailsPrefetchPath);
        }
        private void _loadOrdersButton_Click(object sender, EventArgs e)
        {
            CustomerEntity selectedCustomer = (CustomerEntity)_customersComboBox.SelectedItem;

            if (selectedCustomer.Orders.Count > 0)
            {
                selectedCustomer.Orders.Clear();
            }
            // fetch the orders of the customer from the db.
            using (DataAccessAdapter adapter = new DataAccessAdapter())
            {
                adapter.FetchEntityCollection(selectedCustomer.Orders, selectedCustomer.GetRelationInfoOrders());
            }
            // bind the orders collection.
            _ordersGridView.DataSource = selectedCustomer.Orders;
        }