示例#1
0
        //[UnitOfWork]
        public ActionResult Index()
        {
            var viewModel = new HomeIndexViewModel();

            viewModel.Theme.Themes.AddRange(_themeProvider.GetThemes());

            //var result = _cacheProvider.Instance.Add(HOME_INDEX_VIEW_MODEL, viewModel);
            var aa = _appSecurityFacade.TestMethod();

            return View(viewModel);
        }
示例#2
0
        public ActionResult Index(HomeIndexViewModel viewModel)
        {
            //viewModel = _cacheProvider.Instance.Get<HomeIndexViewModel>(HOME_INDEX_VIEW_MODEL);

            if (!ModelState.IsValid)
            {
                Error("Some fields are not correct!!!");

                return RedirectToAction("Index");
            }

            TryUpdateModel(viewModel);

            return RedirectToAction("Index");
        }