public void Update(T record) { using (var context = new BakeshoppeInventorySystemContext()) { context.Entry(record).State = EntityState.Modified; context.SaveChanges(); } }
public void UpdateRange(List <T> records) { using (var context = new BakeshoppeInventorySystemContext()) { foreach (var record in records) { context.Entry(record).State = EntityState.Modified; } context.SaveChanges(); } }