public async Task<Customer> UpdateCustomer(Customer customer)
        {
            _dbContext.ApplyChanges(customer);

            try
            {
                await _dbContext.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException updateEx)
            {
                throw new FaultException(updateEx.Message);
            }

            await _dbContext.LoadRelatedEntitiesAsync(customer);
            customer.AcceptChanges();
            return customer;
        }
        public async Task<Customer> CreateCustomer(Customer customer)
        {
            customer.TrackingState = TrackingState.Added;
            _dbContext.ApplyChanges(customer);

            try
            {
                await _dbContext.SaveChangesAsync();
            }
            catch (DbUpdateException updateEx)
            {
                throw new FaultException(updateEx.Message);
            }

            await _dbContext.LoadRelatedEntitiesAsync(customer);
            customer.AcceptChanges();
            return customer;
        }
 private static void PrintCustomer(Customer c)
 {
     Console.WriteLine("{0} {1} {2} {3}",
         c.CustomerId,
         c.CompanyName,
         c.ContactName,
         c.City);
 }