public Edit ( int id ) : System.Web.Mvc.ActionResult | ||
id | int | |
return | System.Web.Mvc.ActionResult |
public ActionResult Edit(int id = 0)
{
Book book = db.Books.Find(id);
if (book == null)
{
return HttpNotFound();
}
ViewBag.CategoryID = new SelectList(db.Categorys, "CategoryID", "Name", book.CategoryID);
return View(book);
}
BookController::Edit ( |