public AuthorItemViewModel GetAuthorInfo(int id) { AuthorItemViewModel model = null; var author = _authorRepository.GetAuthorById(id); if (author != null) { model = new AuthorItemViewModel { Id = author.Id, FirstName = author.FirstName, LastName = author.LastName }; } return(model); }
public ActionResult Delete(AuthorItemViewModel authorDel) { _authorProvider.Delete(authorDel.Id); return(RedirectToAction("Index")); }