Beispiel #1
0
 /// <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");
     }
 }
Beispiel #2
0
 public void Delete(IEnumerable <T> obj)
 {
     MongoCollection.DeleteMany(Builders <T> .Filter.In(x => x.Id, obj.Select(x => x.Id)));
 }
Beispiel #3
0
 public static void Delete(Expression <Func <T, bool> > p)
 {
     MongoCollection.DeleteMany(p);
 }
 public void DeleteSync(Expression <Func <T, bool> > where)
 {
     MongoCollection.DeleteMany(where);
 }