public void MergeData(SimpleMapDb.BuildingsDataTable buildings) { if (BuildingDbRows == null) { return; } BuildingDbRows.Merge(buildings, false, MissingSchemaAction.Error); Parallel.ForEach(buildings, row => { var newRow = BuildingDbRows.FindByID(row.ID); Insert(newRow); }); //apply changes to db here }
public BuildingTree() : base(SpatialSheetPowerTypes.Ultra, SpatialSheetPowerTypes.Extra, SpatialSheetPowerTypes.Medium, SpatialSheetPowerTypes.Low) { BuildingDbRows = new SimpleMapDb.BuildingsDataTable(); }