Esempio n. 1
0
        public IActionResult Details()
        {
            var model = new BookDetailsViewModel();

            model.Books    = _bookData.GetAll();
            model.Abstract = "Books Repository";
            return(View(model));
        }
        public IActionResult AllDetails()
        {
            var model = new BooksAndJournalDetailsModel();

            model.Books    = _bookData.GetAll();
            model.Journals = _journalData.GetAllJournals();
            return(View(model));
        }
        public IActionResult Index()
        {
            var model = new BookIndexViewModel
            {
                Books = _bookData.GetAll(),
            };

            return(View(model));
        }
        public IActionResult ProfilePage()
        {
            var model = new HomeProfilePageViewModel();

            model.favoriteBooks = _bookdata.GetAll();
            model.softwares     = _softwareData.GetAll();

            return(View(model));
        }
Esempio n. 5
0
        public ViewResult Index()
        {
            var model = _books.GetAll().Select(book =>
                                               new BookViewModel
            {
                Id    = book.Id,
                Title = book.Title,
                Genre = book.Genre.ToString()
            });

            return(View(model));
        }
        public IActionResult Books_Read()
        {
            var data = _bookData.GetAll();

            return(Json(data));
        }
Esempio n. 7
0
 public void OnGet()
 {
     Books = bookData.GetAll();
 }
Esempio n. 8
0
        // GET: api/Books
        public IHttpActionResult GetBooks()
        {
            var books = db.GetAll().Select(b => b.JsonReady());

            return(Json(books));
        }