예제 #1
0
        public ActionResult Book_Detail(int book_id)
        {
            var book = new BookWithAvailableCopies(BookRepository.BookDetail(book_id));

            int checkOuts = BookRepository.AvailableCopies().Count(item => item.book_id == book_id);

            book.available_copies -= checkOuts;

            return(View(book));
        }