コード例 #1
0
        public ActionResult Create()
        {
            var menu = new MenuVM();

            menu.DefinirTipo(MenuTipo.Raiz);

            return(View("Create", menu));
        }
コード例 #2
0
        public ActionResult Create(Guid menuPaiId, MenuTipo tipo)
        {
            var model = new MenuVM();

            model.DefinirTipo(tipo);

            var pai = _appServices.ObterMenuPorId(menuPaiId);

            model.MenuPaiId     = pai.Id;
            model.MenuPai       = pai;
            model.MenuPaiTitulo = pai.Titulo;

            return(View("Create", model));
        }