public ActionResult IndexViaAjax(IndexViewModel viewModel)
        {
            if (ModelState.IsValid)
            {
                WriteErrorConfiguration(viewModel);
            }

            return PartialView("EditorTemplates/IndexViewModel", viewModel);
        }
        public ActionResult Index(IndexViewModel viewModel)
        {
            if (!ModelState.IsValid)
            {
                return View(viewModel);
            }

            WriteErrorConfiguration(viewModel);

            return Redirect("/");
        }
        private void WriteErrorConfiguration(IndexViewModel viewModel)
        {
            var errorConfigurationView = Mapper.Map<IndexViewModel, ErrorConfigurationView>(viewModel);

            _errorConfigurationService.WriteErrorConfiguration(errorConfigurationView);
        }