public void GlobalCleanupNormal() { _fileMetaNormalCollection = null; DatabaseInstanceNormal.DropCollection(nameof(FileMetaBase)); DatabaseInstanceNormal.Dispose(); }
public void CleanUpNormal() { const string collectionName = nameof(FileMetaBase); var droppedCollectionIndexes = DatabaseInstanceNormal.GetCollection(collectionName).GetIndexes().ToList(); DatabaseInstanceNormal.DropCollection(collectionName); foreach (var indexInfo in droppedCollectionIndexes) { DatabaseInstanceNormal.Engine.EnsureIndex(collectionName, indexInfo.Field, indexInfo.Expression); } }