public int ModifyCustomer(Customer customer)
 {
     using (HAO_Entities db = new HAO_Entities())
     {
         db.Customers.Attach(customer);
         db.Entry <Customer>(customer).State = EntityState.Modified;
         return(db.SaveChanges());
     }
 }
 public int ModidyProduct(Product product)
 {
     using (HAO_Entities db = new HAO_Entities())
     {
         db.Products.Attach(product);
         db.Entry <Product>(product).State = EntityState.Modified;
         return(db.SaveChanges());
     }
 }