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