Optimize internal code

This commit is contained in:
2881099 2020-12-25 18:58:07 +08:00
parent e5dce71982
commit 0cdcfffcf9
2 changed files with 3 additions and 1 deletions

View File

@ -187,7 +187,9 @@ namespace FreeSql.Internal
}
try
{
col.DbDefaultValue = common.GetNoneParamaterSqlValue(new List<DbParameter>(), "init", col, colattr.MapType, defaultValue);
var initParms = new List<DbParameter>();
col.DbDefaultValue = common.GetNoneParamaterSqlValue(initParms, "init", col, colattr.MapType, defaultValue);
if (initParms.Any()) col.DbDefaultValue = "NULL";
}
catch
{