mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-11-08 10:24:55 +08:00
MySql Support DateTimeOffset
This commit is contained in:
@@ -37,6 +37,17 @@ namespace OrmTest
|
||||
}).ToList();
|
||||
Db.CodeFirst.InitTables<UnitTest012213>();
|
||||
Db.CodeFirst.InitTables<UnitTest3131>();
|
||||
Db.CodeFirst.InitTables<UnitDateOfTime2>();
|
||||
|
||||
Db.Insertable(new UnitDateOfTime2() { DateTimeOffset1 = DateTimeOffset.Now }).ExecuteCommand();
|
||||
var list2 = Db.Queryable<UnitDateOfTime2>().ToList();
|
||||
|
||||
}
|
||||
|
||||
public class UnitDateOfTime2
|
||||
{
|
||||
[SqlSugar.SugarColumn(ColumnDataType ="datetime(3)")]
|
||||
public DateTimeOffset DateTimeOffset1 { get; set; }
|
||||
}
|
||||
|
||||
public class UnitTest3131
|
||||
|
||||
Reference in New Issue
Block a user