Exemplo n.º 1
0
        public ActionResult Create()
        {
            BookModel bkmodel = new BookModel();

            bkmodel.BookName   = "C# Book";
            ViewBag.bkCategory = new SelectList(db.GetBookCategory(), "CategoryBookName", "CategoryBookName");
            ViewBag.bkAuthor   = new SelectList(dbAuth.GetAuthors(), "AuthorId", "AuthorName");

            return(View(bkmodel));
        }