static void AddBooks() { var listToAdd = BooksHelperStatic.GetRandomBooks(5); var logic = new BookLogic(); foreach (var item in listToAdd) { logic.AddBook(item); Console.WriteLine("Done!"); } }
static void ReadBooks() { var bookl = new BookLogic(); var lisboks = bookl.GetAllBooks(); foreach (var item in lisboks) { Console.WriteLine(JsonConvert.SerializeObject(item, Formatting.Indented)); } }