public int SaveAddress(HsrOrderApp.BL.DomainModel.Address address, HsrOrderApp.BL.DomainModel.Customer forThisCustomer)
        {
            AddressRepository rep = new AddressRepository(db);
            int addressid         = rep.SaveAddress(address);

            if (address.IsNew)
            {
                CustomerAddress ca = new CustomerAddress();
                ca.AddressId  = addressid;
                ca.CustomerId = forThisCustomer.CustomerId;
                db.CustomerAddresses.InsertOnSubmit(ca);
                db.SubmitChanges();
            }
            return(addressid);
        }
        public void DeleteAddress(int id)
        {
            AddressRepository rep = new AddressRepository(db);

            rep.DeleteAddress(id);
        }
 public int SaveAddress(HsrOrderApp.BL.DomainModel.Address address, HsrOrderApp.BL.DomainModel.Customer forThisCustomer)
 {
     AddressRepository rep = new AddressRepository(db);
     int addressid = rep.SaveAddress(address);
     if (address.IsNew)
     {
         CustomerAddress ca = new CustomerAddress();
         ca.AddressId = addressid;
         ca.CustomerId = forThisCustomer.CustomerId;
         db.CustomerAddresses.InsertOnSubmit(ca);
         db.SubmitChanges();
     }
     return addressid;
 }
 public void DeleteAddress(int id)
 {
     AddressRepository rep = new AddressRepository(db);
     rep.DeleteAddress(id);
 }