public async Task<List<Region>> GetAllRegions()
 {
     using (var _db = new DomainContext())
     {
         return await _db.Regions.ToListAsync();
     }
 }
 public async Task<List<Customer>> GetAllCustomerByName(string name)
 {
     using (var _db = new DomainContext())
     {
         return await _db.Customers.Where(customer => customer.LastName.Contains(name)).Include(customer => customer.Region).ToListAsync();
     }
 }
 public async Task<List<Customer>> GetAllCustomers()
 {
     using (var _db = new DomainContext())
     {
         return await _db.Customers.Include(customer => customer.Region).ToListAsync();
     }
 }
 public async Task AddCustomer(Customer customer)
 {
     using (var _db = new DomainContext())
     {
         _db.Customers.Add(customer);
         await _db.SaveChangesAsync();
     }
 }
        public async Task UpdateCustomer(Customer customer)
        {
            using (var _db = new DomainContext())
            {
                var entity = _db.Customers.Find(customer.Id);

                _db.Entry(entity).CurrentValues.SetValues(customer);
                await _db.SaveChangesAsync();
            }
        }
        public async Task DeleteCustomer(Customer customer)
        {
            using (var _db = new DomainContext())
            {
                var entity = _db.Customers.Find(customer.Id);

                _db.Customers.Remove(entity);
                await _db.SaveChangesAsync();
            }
        }