public void TryOut() { Console.WriteLine("De BookApp"); //omdat er altijd van Book.Xml vertrokken wordt => hard coded ipv DI Bll.Book book = new Bll.Book(); Dal.BookXml bookXml = new Dal.BookXml(book); bookXml.Book = book; bookXml.ReadAll(); //als er zowel csv als json als xml aanwezig waren kon met DI gewerkt worden zoals hieronder //dal.Separator = '|'; //dal.ReadAll(); //Verder werken met DI Console.WriteLine(dal.Message); View.BookConsole view = new View.BookConsole(dal.Book); view.List(); // serialize postcodes met een andere separator // naar ander bestand dal.ConnectionString = "Data/Book2"; dal.Create('|'); Console.WriteLine(dal.Message); }
static void PrintXml() { Bll.Book book = new Bll.Book(); Dal.BookXml bookXml = new Dal.BookXml(book); bookXml.ConnectionString = @"Data/Book2"; // bookXml.Book = book; bookXml.ReadAll(); Console.WriteLine(bookXml.Message); View.BookConsole view = new View.BookConsole(book); view.List(); }
static void CreateXmlFromXml() { Console.WriteLine("".PadLeft(100, '*')); Console.WriteLine($"\n\nDe Book App Xml to Xml\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); bookXml.ConnectionString = "Data/Book2"; bookXml.Create(); Console.WriteLine(bookXml.Message); }
static void CreateXmlFromXml() { Console.WriteLine("De Book App Xml to Xml"); 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(); bookXml.ConnectionString = "Data/Book2"; bookXml.Create(); Console.WriteLine(bookXml.Message); }
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); }
public static void CreateCSV() { Console.WriteLine("".PadLeft(60, '*')); Console.WriteLine("\n\n\nDe BookApp CSV\n\n\n"); Console.WriteLine("".PadLeft(60, '*')); Bll.Book book = new Bll.Book(); Dal.BookXml bookXml = new Dal.BookXml(book); bookXml.Book = book; bookXml.ReadAll(); Console.WriteLine(bookXml.Message); Dal.BookCsv bookCsv = new Dal.BookCsv(book); bookCsv.ConnectionString = @"Data/Book2"; bookCsv.Create('|'); Console.WriteLine(bookCsv.Message); }
static void CreateXmlFromXml() { Console.WriteLine("".PadLeft(100, '*')); Console.WriteLine($"\n\nDe Book App Xml to Xml\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); //No need to show the list from originalXml // View.BookConsole view = new View.BookConsole(book); // view.List(); bookXml.ConnectionString = "Data/Book2"; bookXml.Create(); Console.WriteLine(bookXml.Message); }
public static void CreateXML() { Console.WriteLine("".PadLeft(60, '*')); Console.WriteLine("\n\n\nDe BookApp XML\n\n\n"); Console.WriteLine("".PadLeft(60, '*')); Bll.Book book = new Bll.Book(); Dal.BookXml bookXml = new Dal.BookXml(book); bookXml.Book = book; bookXml.ReadAll(); Console.WriteLine(bookXml.Message); BookXml bookXml1 = new BookXml(book); bookXml1.ConnectionString = @"Data/Book2"; bookXml1.Create(); Console.WriteLine(bookXml1.Message); }