Esempio n. 1
0
        public void Add(Book book)
        {
            if (book == null)
            {
                return;
            }

            this.nextId++;
            book.Id = nextId.ToString();

            this.books.TryAdd(book.Id, book);
        }
Esempio n. 2
0
        private Book BookCreator()
        {
            Book book = new Book
            {
                Name = "The Shining",
                OriginalName = "Shining",
                PublicationYear = 1998,
                Loaner = "Jeesus",
                OnLoan = true
            };

            return book;
        }
Esempio n. 3
0
 public void Update(Book book)
 {
     this.books[book.Id] = book;
 }