Browse Source

-

pull/12/MERGE
sunkaixuan 7 years ago
parent
commit
45ba7d260d
  1. 2
      Src/Asp.Net/SqlSugar/Abstract/DbFirstProvider/DbFirstProvider.cs

2
Src/Asp.Net/SqlSugar/Abstract/DbFirstProvider/DbFirstProvider.cs

@ -177,7 +177,7 @@ namespace SqlSugar
PropertyDescriptionText = GetPropertyDescriptionText(item, PropertyDescriptionText);
PropertyText = PropertyDescriptionText + PropertyText;
classText = classText.Replace(DbFirstTemplate.KeyPropertyName, PropertyText + (isLast ? "" : ("\r\n" + DbFirstTemplate.KeyPropertyName)));
if (ConstructorText.IsValuable() && item.DefaultValue.IsValuable())
if (ConstructorText.IsValuable() && item.DefaultValue!=null)
{
var hasDefaultValue = columns.Skip(index + 1).Any(it=>it.DefaultValue.IsValuable());
ConstructorText = ConstructorText.Replace(DbFirstTemplate.KeyPropertyName, propertyName);

Loading…
Cancel
Save