public IActionResult EditWriter(IFormCollection collection, Writer writer) { if (!ModelState.IsValid) { return(View("EditWriter", writer)); } if (writer.WriterId != 0) { bookService.UpdateWriter(writer); } return(RedirectToAction("Writers")); }