mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-20 18:48:09 +08:00
Update mongodb
This commit is contained in:
@@ -25,8 +25,16 @@ namespace MongoDb.Ado.data
|
||||
bulkOps.Add(op);
|
||||
}
|
||||
if (bulkOps.Count == 0) return 0;
|
||||
var result = collection.BulkWrite(bulkOps);
|
||||
return (int)result.ModifiedCount;
|
||||
if (context.IsAnyServerSession)
|
||||
{
|
||||
var result = collection.BulkWrite(context.ServerSession,bulkOps);
|
||||
return (int)result.ModifiedCount;
|
||||
}
|
||||
else
|
||||
{
|
||||
var result = collection.BulkWrite(bulkOps);
|
||||
return (int)result.ModifiedCount;
|
||||
}
|
||||
}
|
||||
|
||||
private List<BsonDocument> ParseJsonArray(string json)
|
||||
|
Reference in New Issue
Block a user