mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-23 04:23:47 +08:00
Insertable list<T> Time Bug, DbFirst Bug
This commit is contained in:
@@ -39,10 +39,11 @@ namespace SqlSugar
|
||||
|
||||
public void Init()
|
||||
{
|
||||
this.TableInfoList = this.Context.DbMaintenance.GetTableInfoList();
|
||||
if (this.Context.DbMaintenance.GetViewInfoList().IsValuable())
|
||||
this.TableInfoList =this.Context.RewritableMethods.TranslateCopy(this.Context.DbMaintenance.GetTableInfoList());
|
||||
var viewList = this.Context.DbMaintenance.GetViewInfoList();
|
||||
if (viewList.IsValuable())
|
||||
{
|
||||
this.TableInfoList.AddRange(this.Context.DbMaintenance.GetViewInfoList());
|
||||
this.TableInfoList.AddRange(viewList);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -198,6 +199,7 @@ namespace SqlSugar
|
||||
{
|
||||
result = "DateTime.Now";
|
||||
}
|
||||
result = result.Replace("\r", "\t").Replace("\n", "\t");
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -284,7 +286,7 @@ namespace SqlSugar
|
||||
private string GetPropertyDescriptionText(DbColumnInfo item, string propertyDescriptionText)
|
||||
{
|
||||
propertyDescriptionText = propertyDescriptionText.Replace(DbFirstTemplate.KeyPropertyDescription, item.ColumnDescription);
|
||||
propertyDescriptionText = propertyDescriptionText.Replace(DbFirstTemplate.KeyDefaultValue, item.Value.ObjToString());
|
||||
propertyDescriptionText = propertyDescriptionText.Replace(DbFirstTemplate.KeyDefaultValue, GetProertypeDefaultValue(item));
|
||||
propertyDescriptionText = propertyDescriptionText.Replace(DbFirstTemplate.KeyIsNullable, item.IsNullable.ObjToString());
|
||||
return propertyDescriptionText;
|
||||
}
|
||||
|
@@ -148,7 +148,7 @@ namespace SqlSugar
|
||||
var type = value.GetType();
|
||||
if (type == PubConst.DateType)
|
||||
{
|
||||
return "'" + value.ObjToDate().ToString("yyyy-MM-dd hh:mm:ss.ms") + "'";
|
||||
return "'" + value.ObjToDate().ToString("yyyy-MM-dd hh:mm:ss.fff") + "'";
|
||||
}
|
||||
else if (type == PubConst.StringType|| type == PubConst.ObjType)
|
||||
{
|
||||
|
Reference in New Issue
Block a user