private static void import(CatfishDbContext Db) { Console.InputEncoding = Encoding.UTF8; XElement file = XElement.Load(Console.OpenStandardInput()); IngestionService srv = new IngestionService(Db); srv.Import(file); Db.SaveChanges(); }
private static void export(CatfishDbContext Db) { IngestionService srv = new IngestionService(Db); Stream stream = Console.OpenStandardOutput(); srv.Export(stream); StreamWriter standardOutput = new StreamWriter(stream); standardOutput.AutoFlush = true; Console.SetOut(standardOutput); }
private static void import(CatfishDbContext Db) { #if DEBUG Console.Error.WriteLine("Starting ingestion import..."); #endif Console.InputEncoding = Encoding.UTF8; IngestionService srv = new IngestionService(Db); srv.Import(Console.OpenStandardInput(), 4); Db.SaveChanges(); }