public void Run() { var textFileLoader = new TextFileLoader(); var consoleWriter = new TextWriter(Console.Out); var importer = new MongoDbDataImporter(textFileLoader); var builder = new ExcelAnnualSalesReportsHandler(); var archiver = new ArchiveHandler(); importer.Subscribe(consoleWriter); builder.Subscribe(consoleWriter); archiver.Subscribe(consoleWriter); importer.ImportData(); builder.BuildReports(); archiver.ZipFolder(PathToAnnualReports, PathToAnnualReportsArchive); }
public void Run() { /// string PathToReportsArchive = @"../../Data/SalesReports.zip"; /// string PathToReports = @"../../Data/SalesReports"; var data = new ArtGalleryDbContext(); var dataImporter = new MongoDb(); var consoleWriter = new TextWriter(Console.Out); var sqlDbDataImporter = new MsSqlDbDataImporter(dataImporter, data); var archiver = new ArchiveHandler(); sqlDbDataImporter.Subscribe(consoleWriter); sqlDbDataImporter.ImportData(); archiver.Subscribe(consoleWriter); /// archiver.UnzipToFolder(PathToReportsArchive, PathToReports); var transfer = new TransferDataFromExcelToDB(data); transfer.GetFile(); }