public static void UpdateProduct(Product product) { using (var context = new NorthwindEntities()) { try { context.Entry(product).State = EntityState.Modified; context.SaveChanges(); } catch (EntityException entityExcp) { Logger.Write(entityExcp); return; } } }
public void SaveChanges() { _context.SaveChanges(); }