Beispiel #1
0
 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);
 }
Beispiel #2
0
 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);
 }