public ActionResult UpdateAuthor(AuthorModel _Update) { if (!ModelState.IsValid) { return(View()); } else { Author _auth = new Author(); _auth.AuthorID = _Update.AuthorID; _auth.FirstName = _Update.FirstName; _auth.LastName = _Update.LastName; _auth.Bio = _Update.Bio; _auth.BirthLocation = _Update.BirthLocation; _auth.DateOfBirth = _Update.DateOfBirth; authBusLay.UpdateAuthorPassThru(_auth); return(RedirectToAction("GetAuthors", "Author")); } }
public ActionResult UpdateAuthor(AuthorModel _Update) { Author _auth = new Author(); _auth.AuthorID = _Update.AuthorID; _auth.FirstName = _Update.FirstName; _auth.LastName = _Update.LastName; _auth.Bio = _Update.Bio; _auth.BirthLocation = _Update.BirthLocation; _auth.DateOfBirth = _Update.DateOfBirth; authorBL.UpdateAuthorPassThru(_auth); return(RedirectToAction("GetAuthors", "Author")); }