public void Update(Book entity)
 {
     if (BooksData.Books.ContainsKey(entity.Id))
         BooksData.Books[entity.Id] = entity;
 }
 public void UpdateBook(Book book)
 {
     _repository.Update(book);
 }
 public void Add(Book entity)
 {
     entity.Id = ID;
     BooksData.Books.Add(ID++, entity);
 }
 public void AddBook(Book book)
 {
     _repository.Add(book);
 }