public ActionResult EditMenuItem(int?id) { ViewBag.Pages = GetPublishedPages(); MenuItemModel menuItem = _menuItemManager.Get(id.Value); var menuItemViewModel = new MenuItemViewModel { Id = menuItem.Id, MenuID = menuItem.MenuID, PageID = menuItem.PageID, TitleMenuItem = menuItem.TitleMenuItem, Url = menuItem.Url, Weight = menuItem.Weight }; return(View(menuItemViewModel)); }
public async Task <IActionResult> Get(int id) { var response = await _menuItemManager.Get(id); return(Ok(response)); }
public ActionResult <MenuItemDto> Get(int id) { return(_menuItemManager.Get(id)); }