mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-11-10 11:25:00 +08:00
Update mongodb
This commit is contained in:
@@ -139,10 +139,14 @@ namespace SqlSugar.MongoDb
|
||||
var utcNow = DateTime.SpecifyKind(dt, DateTimeKind.Utc);
|
||||
return new BsonDateTime(utcNow);
|
||||
}
|
||||
else if (value is Guid g)
|
||||
else if (value is Guid g)
|
||||
{
|
||||
value = g.ToString();
|
||||
}
|
||||
else if (value is string s&&IsValidObjectId(s))
|
||||
{
|
||||
value = ObjectId.Parse(s);
|
||||
}
|
||||
return BsonValue.Create(value);
|
||||
}
|
||||
internal static MongoDB.Bson.IO.JsonWriterSettings GetJsonWriterSettings()
|
||||
|
||||
Reference in New Issue
Block a user