public static void DropIndex <T>(string connectionName, string database, string collection, MongoIndexKeysWarpper <T> indexkeys) where T : new() { DropIndex(connectionName, database, collection, indexkeys); }
public static void EnsureIndex <T>(string connectionName, string database, string collection, MongoIndexKeysWarpper <T> indexkeys, bool unique = false) where T : new() { EnsureIndex(connectionName, database, collection, indexkeys, unique); }
public static void DropIndex(string connectionName, string database, string collection, MongoIndexKeysWarpper indexkeys) { var mongocollection = GetCollecion(connectionName, database, collection); mongocollection.DropIndex(indexkeys.MongoIndexKeys); }
public static void EnsureIndex(string connectionName, string database, string collection, MongoIndexKeysWarpper indexkeys, bool unique = false) { var mongocollection = GetCollecion(connectionName, database, collection); if (unique) { mongocollection.CreateIndex(indexkeys.MongoIndexKeys, IndexOptions.SetUnique(true)); } else { mongocollection.CreateIndex(indexkeys.MongoIndexKeys); } }