static int Main(string[] args) { if (args.Length < 3) { Console.WriteLine("Usage: Straten.exe <operation> <nl|fr> <city>"); return(1); } int operation = int.Parse(args[0]); string taalCode = args[1]; string gemeente = args[2]; Land land = new Land(1, "Belgie", taalCode); var regio = new Regio(1, "Vlaanderen", land); land.Regios.Add(regio); switch (operation) { case 1: //land.Read(gemeente); land.ReadAll(); land.Persist(); land.MakeBLOB(); break; default: case 2: land.LoadBLOB(); land.Persist(); break; } //Exporters.FileExporter fileExporter = new Exporters.FileExporter(land); //fileExporter.Export(gemeente); /* * Exporters.ConsoleExporter consoleExporter = new Exporters.ConsoleExporter(land); * consoleExporter.Export(gemeente); */ return(0); }
static int Main(string[] args) { if (args.Length < 3) { Console.WriteLine("Usage: Straten.exe <operation> <nl|fr> <city>"); return(1); } int operation = int.Parse(args[0]); string taalCode = args[1]; string gemeente = args[2]; Land land = new Land { Id = 1, Naam = "Belgie", TaalCode = taalCode }; var regio = new Regio { Id = 1, Naam = "Vlaanderen", Land = land }; land.Regios.Add(regio.Naam, regio); switch (operation) { case 1: land.Read(); land.Persist(); break; /* * default: * case 2: * land.Load(); * break; */ } Exporters.FileExporter fileExporter = new Exporters.FileExporter(land); fileExporter.Export(gemeente); /* * Exporters.ConsoleExporter consoleExporter = new Exporters.ConsoleExporter(land); * consoleExporter.Export(gemeente); */ return(0); }