mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-10-15 18:55:07 +08:00
-
This commit is contained in:
@@ -177,7 +177,7 @@ namespace SqlSugar
|
|||||||
PropertyDescriptionText = GetPropertyDescriptionText(item, PropertyDescriptionText);
|
PropertyDescriptionText = GetPropertyDescriptionText(item, PropertyDescriptionText);
|
||||||
PropertyText = PropertyDescriptionText + PropertyText;
|
PropertyText = PropertyDescriptionText + PropertyText;
|
||||||
classText = classText.Replace(DbFirstTemplate.KeyPropertyName, PropertyText + (isLast ? "" : ("\r\n" + DbFirstTemplate.KeyPropertyName)));
|
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());
|
var hasDefaultValue = columns.Skip(index + 1).Any(it=>it.DefaultValue.IsValuable());
|
||||||
ConstructorText = ConstructorText.Replace(DbFirstTemplate.KeyPropertyName, propertyName);
|
ConstructorText = ConstructorText.Replace(DbFirstTemplate.KeyPropertyName, propertyName);
|
||||||
|
Reference in New Issue
Block a user