Esempio n. 1
0
        public static void Main()
        {
            SuperheroesUniverseDbContext context = new SuperheroesUniverseDbContext();

            // importers
            JsonSuperheroesImporter jsonImporter = new JsonSuperheroesImporter(context);

            jsonImporter.LoadSuperheroesData("../../Data/sample-data.json");

            // exporters
            SuperheroesUniverseExporter xmlExporter = new SuperheroesUniverseExporter(context, "../../heroes.xml");

            xmlExporter.ExportAllSuperheroes();
        }
        public static void Main()
        {
            var superHeroesContext = new SuperHeroesDbContext();

            //var jsonImporter = new JsonSuperheroesImporter(superHeroesContext);
            //jsonImporter.LoadSuperHeroes("../../sample-data.json");

            var superheroesExporter = new SuperheroesUniverseExporter(superHeroesContext, "../../heroes.xml");

            superheroesExporter.ExportAllSuperheroes();
            // superheroesExporter.ExportSupperheroesWithPower("Martial Arts");
            // superheroesExporter.ExportSuperheroesByCity("New York");
            // superheroesExporter.ExportSuperheroDetails(4);
            // superheroesExporter.ExportFractions();
            // superheroesExporter.ExportFractionDetails(1);
        }