using System; using System.Collections.Generic; namespace Bücherwurm { class Catalogue { private List Books {get; set;} private int NextId {get; set;} public Catalogue() { Books = new List(); NextId = 0; } public void Import(string JsonString) { throw new NotImplementedException(); } public void Add(string Title, string Author, string Country, string ILink, string Link, string Language, int Pages, int Year) { Books.Add(new Book(NextId, Title, Author, Country, ILink, Link, Language, Pages, Year)); NextId = NextId++; } public void Remove(int BookID) { Books.RemoveAll(book => book.BookId == BookID); } public List GetBooks() { return Books; } public Book LookupBook(int BookId) { return Books.Find(book => book.BookId == BookId); } } }