Exemple #1
0
        public ActionResult Edit(AboutViewModel aboutViewModel)
        {
            if (!ModelState.IsValid)
            {
                ModelState.AddModelError("TitleName", "İçeriği düzenleyebilmek için gerekli tüm alanları doldurmanız gerekmektedir");
                return(View());
            }

            var aboutPage = aboutViewModel.GetAboutPage();

            _aboutPageService.UpdateAbout(aboutPage);
            return(RedirectToAction("Index"));
        }
Exemple #2
0
        public ActionResult Edit(AboutViewModel aboutViewModel)
        {
            if (!ModelState.IsValid)
            {
                ModelState.AddModelError("", "tüm alanları doldurman zorunludurR.");
                return(View());
            }
            var aboutPage = aboutViewModel.GetAboutPage();

            _aboutPageServices.UpdateAbout(aboutPage);

            return(RedirectToAction("Index"));
        }