Exemplo n.º 1
0
        public ActionResult AddBook()
        {
            string title    = Request.Form["title"];
            int    year     = Convert.ToInt32(Request.Form["year"]);
            int    ph       = Convert.ToInt32(_publishingHouseLogic.GetAll().Find(house => house.PublishingHouseTitle == Request.Form["ph"]).PublishingHouseID);
            string language = Request.Form["language"];

            _bookLogic.Create(new Book(title, year, ph, language));
            return(RedirectToAction("AllBooks"));
        }
Exemplo n.º 2
0
 public void Create(Book book)
 {
     _bookLogic.Create(book);
 }