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