Exemple #1
0
        public IActionResult Index(IDictionary <string, string> routeValues)
        {
            HomeIndexViewModel model = new HomeIndexViewModel();

            if (ModelState.IsValid)
            {
                model.LoadFilteredModelData(_unitOfWork, routeValues[nameof(model.FilterFrom)], routeValues[nameof(model.FilterTo)]);
                return(View(model));
            }
            else
            {
                model.LoadModelData(_unitOfWork);
                return(View(model));
            }
        }