public IActionResult DeleteMenuItem(MenuItemCreateViewModel model) { string[] itemIDS = model.MenuItemString.Split(','); for (int i = 0; i < itemIDS.Length; i++) { var menuItem = _menuItemManager.GetMenuItemByMenuIdAndItemId(model.MenuID, Int32.Parse(itemIDS[i])); if (menuItem == null) { return(NotFound()); } _menuItemManager.DeleteMenuItem(menuItem.ID); } return(NoContent()); }