mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 13:06:50 +08:00
db.Fastest Support datetimeoffset
This commit is contained in:
parent
d54101ce68
commit
cf228b4155
@ -22,6 +22,11 @@ namespace OrmTest
|
||||
public string [] json { get; set; }
|
||||
}
|
||||
|
||||
public class TestFAST1121
|
||||
{
|
||||
|
||||
public DateTimeOffset A { get; set; }
|
||||
}
|
||||
public class DemoO_Fastest
|
||||
{
|
||||
public static void Init()
|
||||
@ -54,7 +59,10 @@ namespace OrmTest
|
||||
//db.Updateable(data).ExecuteCommand();
|
||||
db.Fastest<TestFAST111>().BulkUpdate(data);
|
||||
var x = db.Queryable<TestFAST111>().ToList();
|
||||
|
||||
db.CodeFirst.InitTables<TestFAST1121>();
|
||||
db.Fastest<TestFAST1121>().BulkCopy(new List<TestFAST1121>() {
|
||||
new TestFAST1121(){ A=DateTimeOffset.Now}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -85,6 +85,10 @@ namespace SqlSugar
|
||||
value = DBNull.Value;
|
||||
}
|
||||
}
|
||||
else if (column.UnderType == UtilConstants.DateTimeOffsetType&& value!=null)
|
||||
{
|
||||
value = UtilMethods.ConvertFromDateTimeOffset((DateTimeOffset)value);
|
||||
}
|
||||
dr[name] = value;
|
||||
}
|
||||
dt.Rows.Add(dr);
|
||||
|
Loading…
Reference in New Issue
Block a user