Beispiel #1
0
        public void DeleteTest()
        {
            List <MenuItem> menuItems = MenuItemManager.Load();
            MenuItem        menuItem  = menuItems.Where(c => c.ItemName == "Cheesy Garlic Bread").FirstOrDefault();
            int             actual    = MenuItemManager.Delete(menuItem.Id);

            Assert.IsTrue(actual > 0);
        }
Beispiel #2
0
        public JsonResult DeleteItem(int ItemId)
        {
            var _menuItemManager = new MenuItemManager();
            var item             = _menuItemManager.GetById(ItemId);

            if (item.ItemId > 0)
            {
                _menuItemManager.Delete(ItemId);

                return(Json(true));
            }
            else
            {
                return(Json(false));
            }
        }
Beispiel #3
0
 // DELETE: api/MenuItem/5
 public void Delete(Guid id)
 {
     MenuItemManager.Delete(id);
 }
Beispiel #4
0
        public void Delete()
        {
            bool result = MenuItemManager.Delete(2);

            Assert.IsTrue(result);
        }