/// <summary> /// Remove all contents (normally by use of a truncate operation) from the data store and persist the change. /// </summary> public virtual void RemoveAll() { Logger.LogDebug("Removing all from the Mongo database", "MongoDbDataStore\\RemoveAll"); try { MongoCollection.DeleteMany(x => true); } finally { Logger.LogDebug("Removing all from the Mongo database... Done", "MongoDbDataStore\\RemoveAll"); } }
public void Delete(IEnumerable <T> obj) { MongoCollection.DeleteMany(Builders <T> .Filter.In(x => x.Id, obj.Select(x => x.Id))); }
public static void Delete(Expression <Func <T, bool> > p) { MongoCollection.DeleteMany(p); }
public void DeleteSync(Expression <Func <T, bool> > where) { MongoCollection.DeleteMany(where); }