mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-24 18:04:52 +08:00
TimeSpan?=null bug
This commit is contained in:
parent
27b64fdf5f
commit
29b005fcc9
@ -93,7 +93,8 @@ namespace OrmTest.BugTest
|
||||
BrandId = -1,
|
||||
UserLevel = 1
|
||||
}).IgnoreColumns(m => new { m.CreditUpdatetime,m.UserId }).ToSql();
|
||||
|
||||
DB.CodeFirst.InitTables(typeof(DataTest));
|
||||
DB.Insertable(new DataTest()).ExecuteCommand();
|
||||
|
||||
}
|
||||
}
|
||||
@ -168,5 +169,10 @@ namespace OrmTest.BugTest
|
||||
public DateTime CreditUpdatetime { get; set; }
|
||||
#endregion
|
||||
}
|
||||
|
||||
public class DataTest {
|
||||
[SugarColumn( ColumnDataType = "time",IsNullable =true)]
|
||||
public TimeSpan? dateTime { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -97,7 +97,8 @@ namespace SqlSugar
|
||||
}
|
||||
else if (type == UtilConstants.TimeSpanType)
|
||||
{
|
||||
this.Value = this.Value.ToString();
|
||||
if (this.Value != null)
|
||||
this.Value = this.Value.ToString();
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user