mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-21 02:58:05 +08:00
Update mongodb
This commit is contained in:
@@ -18,8 +18,16 @@ namespace MongoDb.Ado.data
|
||||
foreach (var doc in documents)
|
||||
{
|
||||
var filter = doc["filter"].AsBsonDocument;
|
||||
var result = collection.DeleteMany(filter);
|
||||
total += (int)result.DeletedCount;
|
||||
if (context.IsAnyServerSession)
|
||||
{
|
||||
var result = collection.DeleteMany(context.ServerSession,filter);
|
||||
total += (int)result.DeletedCount;
|
||||
}
|
||||
else
|
||||
{
|
||||
var result = collection.DeleteMany(filter);
|
||||
total += (int)result.DeletedCount;
|
||||
}
|
||||
}
|
||||
return total;
|
||||
}
|
||||
|
Reference in New Issue
Block a user