public Customer[] GetCustomers()
        {
            var client = new CrmDataServiceChannel();
            var customers = new Customer[] { };

            try
            {
                customers = client.GetCustomers();
                client.Close();
            }
            catch (CommunicationException)
            {
                client.Abort();
                throw;
            }
            catch (TimeoutException)
            {
                client.Abort();
                throw;
            }
            catch (Exception)
            {
                client.Abort();
                throw;
            }

            return customers;
        }
        public Customer GetCustomer(Guid id)
        {
            var client = new CrmDataServiceChannel();
            Customer customer;

            try
            {
                customer = client.GetCustomer(id);
                client.Close();
            }
            catch (CommunicationException)
            {
                client.Abort();
                throw;
            }
            catch (TimeoutException)
            {
                client.Abort();
                throw;
            }
            catch (Exception)
            {
                client.Abort();
                throw;
            }

            return customer;
        }
        public void UpdateCustomer(Customer customer)
        {
            var client = new CrmDataServiceChannel();

            try
            {
                client.UpdateCustomer(customer);
                client.Close();
            }
            catch (CommunicationException)
            {
                client.Abort();
                throw;
            }
            catch (TimeoutException)
            {
                client.Abort();
                throw;
            }
            catch (Exception)
            {
                client.Abort();
                throw;
            }
        }