public ActionResult AddAbout(About about) { AboutValidator aboutValidator = new AboutValidator(); ValidationResult validationResult = aboutValidator.Validate(about); if (validationResult.IsValid) { aboutManager.AboutAddBL(about); return(RedirectToAction("Index")); } else { foreach (var error in validationResult.Errors) { ModelState.AddModelError(error.PropertyName, error.ErrorMessage); } } return(View()); }
public ActionResult AddAbout(About p) { abm.AboutAddBL(p); return(RedirectToAction("Index")); }
public ActionResult AddAbout(About about) { aboutManager.AboutAddBL(about); return(RedirectToAction("Index")); }