public ActionResult AddBook(int patronId)
        {
            Patron patron = Patron.Find(patronId);
            Book   book   = Book.Find(int.Parse(Request.Form["bookid"]));

            patron.AddBook(book);
            return(RedirectToAction("Details", new { id = patronId }));
        }
Beispiel #2
0
        public ActionResult AddBook(int patronId)
        {
            Patron patron   = Patron.Find(patronId);
            Book   thisBook = Book.Find(Convert.ToInt32(Request.Form["book-id"]));

            patron.AddBook(thisBook);
            return(RedirectToAction("Index"));
        }