public void EditOrder(Order order) { using (var context = new ContextGrabber()) { context.Orders.Add(order); context.Entry(order).State = System.Data.Entity.EntityState.Modified; context.SaveChanges(); } }
public void EditProduct(Product product) { using (var context = new ContextGrabber()) { context.Products.Add(product); context.Entry(product).State = System.Data.Entity.EntityState.Modified; context.SaveChanges(); } }
public void EditCustomer(Customer customer) { using (var context = new ContextGrabber()) { context.Customers.Add(customer); context.Entry(customer).State = System.Data.Entity.EntityState.Modified; context.SaveChanges(); } }