public ActionResult Delete(int?id) { var db = new BookstoreDb(); var publishers = db.GetPublishers().Where(i => i.Id == id).FirstOrDefault(); return(View(publishers)); }
// GET: Book/Create public ActionResult Create() { var publishers = _db.GetPublishers(); var list = new SelectList(publishers, "Id", "Name"); return(View(list)); }
// GET: Publisher // GET: Publisher public ActionResult Index() { var db = new BookstoreDb(); var publishers = db.GetPublishers(); return(View(publishers.ToList())); }
// GET: Publisher public ActionResult Index() { var db = new BookstoreDb(); var publishers = db.GetPublishers(); ViewBag.PageTitle = "Publisher list"; return(View(publishers.ToList())); }