コード例 #1
0
ファイル: BookController.cs プロジェクト: moloney027/ADO.NET
        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"));
        }
コード例 #2
0
 public void Create(Book book)
 {
     _bookLogic.Create(book);
 }