public static bool UpdateBookGenreID(int id, BookGenre genre) { if (_bookGenre.ContainsKey(id)) { _bookGenre[id] = genre; return(true); } return(false); }
public static bool UpdateBookByID(int id, Book book, BookGenre bookGenre) { if (_books.ContainsKey(id)) { _books[id] = book; _authors[book.AuthorID] = book.Author; _bookGenre[book.GenreID] = book.Genre; return(true); } return(false); }
public static BookGenre AddBookGenre(BookGenre type) { type.ID = _bookGenre.Keys.Max() + 1; _bookGenre.Add(type.ID, type); return(type); }