コード例 #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);
 }
コード例 #2
0
 public virtual bool Remove(Expression <Func <TEntity, bool> > filter)
 {
     return(PrimaryMongoCollection.DeleteMany(filter).IsAcknowledged);
 }