public void SynchronizeId() { DB_.DropCollection(DB_ID_COLLECTION); var allStockIds = GetAllStockIDs(); var idColl = DB_.GetCollection(DB_ID_COLLECTION); StockIds ids = new StockIds(); ids.BatchAddStockIDs(allStockIds); idColl.Insert(ids); }