コード例 #1
0
 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();
 }
コード例 #2
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);
 }
コード例 #3
0
ファイル: Program.cs プロジェクト: timjanssens/Programmeren3
 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);
 }