private static void ExportEnhancementDatabase(ExportOptions options, IList <IExporter> exporters) { using (var file = File.OpenRead(options.EnhancementSetPath)) { using (var binaryReader = new BinaryReader(file, Encoding.Default, true)) { var enhancementDatabaseReader = new EnhancementDatabaseReader(binaryReader); foreach (var exporter in exporters) { exporter.Register(enhancementDatabaseReader); } while (enhancementDatabaseReader.Read()) { ; } } } }
public void Load(DomainContext context) { var mapper = new MidsDomainContextMapper(context); mapper.Register(_databaseReader); mapper.Register(_enhancementDatabaseReader); while (_databaseReader.Read()) { ; } context.SaveChanges(); while (_enhancementDatabaseReader.Read()) { ; } context.SaveChanges(); }