Ejemplo n.º 1
0
        public async Task <IActionResult> NavMenuSettings([FromServices] MenuService menuService)
        {
            var menuItemsResp = await menuService.GetAllMenus();

            if (menuItemsResp.IsSuccess)
            {
                var model = new NavMenuManageViewModel
                {
                    MenuItems = menuItemsResp.Item
                };

                return(View(model));
            }

            return(ServerError(menuItemsResp.Message));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> Manage([FromServices] MenuService menuService)
        {
            var menuItemsResp = await menuService.GetAllAsync();

            if (menuItemsResp.IsSuccess)
            {
                var model = new NavMenuManageViewModel
                {
                    MenuItems = menuItemsResp.Item
                };

                return(View("~/Views/Admin/ManageNavMenu.cshtml", model));
            }

            return(ServerError(menuItemsResp.Message));
        }