public void PatchItem(IList <Item> items)
        {
            for (int i = 0; i < items.Count; i++)
            {
                Item item = new Item();
                item = items.ElementAt(i);

                _context.Attach(item);
                _context.Entry(item).Property(p => p.StorageQuantity).IsModified = true;
                _context.SaveChanges();
            }
        }
 public void PutCompany(Company company)
 {
     _context.Attach(company);
     _context.Entry(company).State = EntityState.Modified;
     _context.SaveChanges();
 }
 public void PatchOrder(Order order)
 {
     _context.Orders.Attach(order);
     _context.Entry(order).Property(o => o.Status).IsModified = true;
     _context.SaveChanges();
 }
Example #4
0
 public void Update(TEntity obj)
 {
     Db.Entry(obj).State = EntityState.Modified;
     Db.SaveChanges();
 }