Exemplo n.º 1
0
        public void DeleteCategory(int categoryid)
        {
            Category c = _context.Category.Find(categoryid);

            _context.Remove(c);
            _context.SaveChanges();
        }
        public void DeleteCategory(string cid)
        {
            Category c = _context.Category.Find(cid);

            _context.Remove(c);
            _context.SaveChanges();
        }
        public void DeleteItem(int itemid)
        {
            Items i = db.Items.Find(itemid);

            db.Remove(i);
            db.SaveChanges();
        }
Exemplo n.º 4
0
        public void DeleteItem(int cartid)
        {
            Cart c = db.Cart.Find(cartid);

            db.Remove(c);
            db.SaveChanges();
        }
        public void DeleteItem(string id)
        {
            Items item = _context.Items.Find(id);

            _context.Remove(item);
            _context.SaveChanges();
        }