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); }
public virtual bool Remove(Expression <Func <TEntity, bool> > filter) { return(PrimaryMongoCollection.DeleteMany(filter).IsAcknowledged); }