mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 22:11:36 +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 string [] json { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class TestFAST1121
|
||||||
|
{
|
||||||
|
|
||||||
|
public DateTimeOffset A { get; set; }
|
||||||
|
}
|
||||||
public class DemoO_Fastest
|
public class DemoO_Fastest
|
||||||
{
|
{
|
||||||
public static void Init()
|
public static void Init()
|
||||||
@ -54,7 +59,10 @@ namespace OrmTest
|
|||||||
//db.Updateable(data).ExecuteCommand();
|
//db.Updateable(data).ExecuteCommand();
|
||||||
db.Fastest<TestFAST111>().BulkUpdate(data);
|
db.Fastest<TestFAST111>().BulkUpdate(data);
|
||||||
var x = db.Queryable<TestFAST111>().ToList();
|
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;
|
value = DBNull.Value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (column.UnderType == UtilConstants.DateTimeOffsetType&& value!=null)
|
||||||
|
{
|
||||||
|
value = UtilMethods.ConvertFromDateTimeOffset((DateTimeOffset)value);
|
||||||
|
}
|
||||||
dr[name] = value;
|
dr[name] = value;
|
||||||
}
|
}
|
||||||
dt.Rows.Add(dr);
|
dt.Rows.Add(dr);
|
||||||
|
Loading…
Reference in New Issue
Block a user