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