Esempio n. 1
0
 public void UpdateCustomer(Customer customer)
 {
     using (var db = new OskarEntities())
     {
         db.Customers.Attach(customer);
         db.Entry(customer).State = EntityState.Modified;
         db.SaveChanges();
     }
 }
Esempio n. 2
0
 public void UpdateProduct(Product product)
 {
     using (var db = new OskarEntities())
     {
         db.Products.Attach(product);
         db.Entry(product).State = EntityState.Modified;
         db.SaveChanges();
     }
 }
Esempio n. 3
0
 public void UpdateOwner(Owner owner)
 {
     using (var db = new OskarEntities())
     {
         db.Owners.Attach(owner);
         db.Entry(owner).State = EntityState.Modified;
         db.SaveChanges();
     }
 }