Example #1
0
 public ActionResult Index()
 {
     ViewBag.Title = "Home Page";
     //byte[] bytes = BooksStorage.Serialize();
     //List<Book> books = BooksStorage.Deserialize(bytes);
     BooksStorage.RestoreInitialState();
     return(View());
 }
Example #2
0
 public List <Book> GetBooks()
 {
     return(BooksStorage.GetBooks());
 }
Example #3
0
        public Book GetBookById(string bookId)
        {
            var books = BooksStorage.GetBooks();

            return(books.FirstOrDefault(x => x.Id == bookId));
        }