- 增加 ExpressionCallAttribute 特性,实现表达式函数自定义解析;

This commit is contained in:
28810
2019-11-20 13:32:49 +08:00
parent 91f0bb92a1
commit d42b2fc2b8
6 changed files with 266 additions and 160 deletions

View File

@ -170,10 +170,7 @@ namespace FreeSql.Internal
if (colattr.IsNullable == false && colattr.DbDefautValue == null)
{
var citype = colattr.MapType.IsNullableType() ? colattr.MapType.GetGenericArguments().FirstOrDefault() : colattr.MapType;
if (citype.IsArray)
colattr.DbDefautValue = Array.CreateInstance(citype, 0);
else
colattr.DbDefautValue = Activator.CreateInstance(citype);
colattr.DbDefautValue = citype.CreateInstanceGetDefaultValue();
}
trytb.Columns.Add(colattr.Name, col);