public ActionResult Edit(AuthorCreateModel author) { if (ModelState.IsValid) { authorService.UpdateAuthor(Mapper.Map<AuthorCreateModel, BLLAuthor>(author)); return RedirectToAction("Index"); } else { ModelState.AddModelError("", "Complete all fields"); } return View(author); }
public ActionResult Create() { var view = new AuthorCreateModel() { IsCreatingNow = true }; return View(view); }