public void Update(brand model)
        {
            brand old = Get(model.brandId);

            _context.Entry(old).State   = EntityState.Detached;
            _context.Entry(model).State = EntityState.Modified;
            _context.SaveChanges();
        }
Beispiel #2
0
        public void Update(product model)
        {
            product old = Get(model.productId);

            _context.Entry(old).State   = EntityState.Detached;
            _context.Entry(model).State = EntityState.Modified;
            _context.SaveChanges();
        }
Beispiel #3
0
        public void Update(category model)
        {
            category old = Get(model.categoryId);

            _context.Entry(old).State   = EntityState.Detached;
            _context.Entry(model).State = EntityState.Modified;
            _context.SaveChanges();
        }