static void PrintJson() { Bll.Book book = new Bll.Book(); Dal.BookJson bookJson = new Dal.BookJson(book); bookJson.ConnectionString = @"Data/Book2"; // bookJson.Book = book; bookJson.ReadAll(); View.BookConsole view = new View.BookConsole(book); view.List(); }
static void CreateJsonFromXml() { Console.WriteLine("".PadLeft(100, '*')); Console.WriteLine($"\n\nDe Bookk App Xml to Json\n\n"); Console.WriteLine("".PadLeft(100, '*')); Bll.Book book = new Bll.Book(); Dal.BookXml bookXml = new Dal.BookXml(book); // bookXml.Book = book; bookXml.ReadAll(); Console.WriteLine(bookXml.Message); // Deserialize naar ander bestand Dal.BookJson bookJson = new Dal.BookJson(book); bookJson.ConnectionString = "Data/Book2"; bookJson.Create(); Console.WriteLine(bookJson.Message); }
static void CreateJsonFromXml() { Console.WriteLine("De Book App Xml to Json"); Bll.Book book = new Bll.Book(); Dal.BookXml bookXml = new Dal.BookXml(book); bookXml.Book = book; bookXml.ReadAll(); Console.WriteLine(bookXml.Message); View.BookConsole view = new View.BookConsole(book); view.List(); // serialize naar ander bestand Dal.BookJson bookJson = new Dal.BookJson(book); bookJson.ConnectionString = "Data/Book2"; bookJson.Create(); Console.WriteLine(bookJson.Message); }