mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-18 17:48:11 +08:00
TimeSpan?=null bug
This commit is contained in:
@@ -93,7 +93,8 @@ namespace OrmTest.BugTest
|
|||||||
BrandId = -1,
|
BrandId = -1,
|
||||||
UserLevel = 1
|
UserLevel = 1
|
||||||
}).IgnoreColumns(m => new { m.CreditUpdatetime,m.UserId }).ToSql();
|
}).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; }
|
public DateTime CreditUpdatetime { get; set; }
|
||||||
#endregion
|
#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)
|
else if (type == UtilConstants.TimeSpanType)
|
||||||
{
|
{
|
||||||
this.Value = this.Value.ToString();
|
if (this.Value != null)
|
||||||
|
this.Value = this.Value.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user