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")); }
public void Create(Book book) { _bookLogic.Create(book); }