static void CreateCsvFromXml() { Console.WriteLine("".PadLeft(100, '*')); Console.WriteLine($"\n\nDe Book App Xml to Csv\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); Dal.BookCsv bookCsv = new Dal.BookCsv(book); bookCsv.ConnectionString = "Data/Book2"; bookCsv.Create(); Console.WriteLine(bookCsv.Message); }
static void CreateCsvFromXml() { Console.WriteLine("De Book App Xml to Csv"); 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(); Dal.BookCsv bookCsv = new Dal.BookCsv(book); bookCsv.ConnectionString = "Data/Book2"; bookCsv.Create(); Console.WriteLine(bookCsv.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); }