Пример #1
0
        public ActionResult BookDetail(int bookID)
        {
            BookDAO book = new BookDAO();

            if (book == null)
            {
                Redirect("Index");
            }
            return(View(book.BookDetail(bookID)));
        }
Пример #2
0
        public IHttpActionResult GetBookDetail(int bookId)
        {
            BookDAO       dao       = new BookDAO();
            var           book      = dao.BookDetail(bookId);
            BookViewModel viewmodel = new BookViewModel(book);

            return(Json(new
            {
                results = viewmodel
            }));
        }