This commit is contained in:
sunkaixuan
2024-05-16 17:16:06 +08:00
parent 7af7a241ac
commit 32395b5bec

View File

@@ -472,7 +472,7 @@ namespace SqlSugar
PropertyText = PropertyText.Replace(DbFirstTemplate.KeyPropertyName, propertyName);
if (typeString == "string"&&this.IsStringNullable&&item.IsNullable==false&&PropertyText.EndsWith("{get;set;}\r\n"))
{
PropertyText=PropertyText.Replace("{get;set;}\r\n", "{get;set;} = string.Empty;\r\n");
PropertyText=PropertyText.Replace("{get;set;}\r\n", "{get;set;} = null!;\r\n");
}
return PropertyText;
}