コード例 #1
0
        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));
        }
コード例 #2
0
        public async Task <IActionResult> Get(int id)
        {
            var response = await _menuItemManager.Get(id);

            return(Ok(response));
        }
コード例 #3
0
 public ActionResult <MenuItemDto> Get(int id)
 {
     return(_menuItemManager.Get(id));
 }