mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-20 18:48:09 +08:00
Update mongodb
This commit is contained in:
@@ -16,7 +16,16 @@ using System.Text.RegularExpressions;
|
||||
namespace SqlSugar.MongoDb
|
||||
{
|
||||
public class UtilMethods
|
||||
{
|
||||
{
|
||||
public static BsonValue MyCreate(object value)
|
||||
{
|
||||
if (value is DateTime dt)
|
||||
{
|
||||
var utcNow = DateTime.SpecifyKind(dt, DateTimeKind.Utc);
|
||||
return new BsonDateTime(utcNow);
|
||||
}
|
||||
return BsonValue.Create(value);
|
||||
}
|
||||
internal static MongoDB.Bson.IO.JsonWriterSettings GetJsonWriterSettings()
|
||||
{
|
||||
return new MongoDB.Bson.IO.JsonWriterSettings
|
||||
|
Reference in New Issue
Block a user