Exemplo n.º 1
0
 public virtual bool Delete(Expression <Func <TEntity, bool> > filter)
 {
     return(SoftDelete
         ? PrimaryMongoCollection.UpdateMany(filter, Builders <TEntity> .Update.Set(i => ((ISoftDelete)i).IsDeleted, true)).IsAcknowledged
         : PrimaryMongoCollection.DeleteMany(filter).IsAcknowledged);
 }
Exemplo n.º 2
0
 public virtual bool Remove(Expression <Func <TEntity, bool> > filter)
 {
     return(PrimaryMongoCollection.DeleteMany(filter).IsAcknowledged);
 }