mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-12-29 19:05:47 +08:00
- 完善 [Column(ServerTime = Utc)] 特性,对 Update 时也能生效;
This commit is contained in:
@@ -188,8 +188,9 @@ namespace FreeSql.Internal
|
||||
//}
|
||||
if (colattr.ServerTime != DateTimeKind.Unspecified && new[] { typeof(DateTime), typeof(DateTimeOffset) }.Contains(colattr.MapType.NullableTypeOrThis()))
|
||||
{
|
||||
col.DbDefaultValue = colattr.ServerTime == DateTimeKind.Local ? common.Now : common.NowUtc;
|
||||
col.DbDefaultValue = "'1970-1-1'";
|
||||
col.DbInsertValue = colattr.ServerTime == DateTimeKind.Local ? common.Now : common.NowUtc;
|
||||
col.DbUpdateValue = colattr.ServerTime == DateTimeKind.Local ? common.Now : common.NowUtc;
|
||||
}
|
||||
if (string.IsNullOrEmpty(colattr.InsertValueSql) == false)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user