public ActionResult Create(Author author) { try { myHandler = new BusinessLogicHandler(); if (ModelState.IsValid) { myHandler.AddAuthor(author); } return RedirectToAction("Index"); } catch { return View(); } }
public ActionResult ViewAuthor(Author author) { myHandler = new BusinessLogicHandler(); if (ModelState.IsValid) { myHandler.AddAuthor(author); } return Json(new { success = true }); }