예제 #1
0
        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();
 }