Example #1
0
 public void OnLoadMongoClick(object sender, RoutedEventArgs e)
 {
     try
     {
         var mongoLoader = new MongoLoader(this.repo, this.nissanMongoDb);
         mongoLoader.LoadRepository();
         repo.SaveChanges();
         Print("Countries, dealers and vehicle data from MongoDB successfully loaded.");
     }
     catch (Exception ex)
     {
         Print(ex.Message);
     }
 }
Example #2
0
 public void OnXMLToMongoClick(object sender, RoutedEventArgs e)
 {
     try
     {
         var xmlParser   = new XmlParser(repo);
         var parseResult = xmlParser.ParseDiscounts(@"..\..\..\Discounts.xml", @"..\..\..\Discounts.xsd");
         var mongoLoader = new MongoLoader(this.repo, this.nissanMongoDb);
         mongoLoader.LoadDiscountsInMongo(parseResult);
         Print("Discounts data from XML to MongoDB successfuly loaded.");
     }
     catch (Exception ex)
     {
         Print(ex.Message);
     }
 }