diff --git a/Src/Asp.Net/SqlSugar/Abstract/EntityMaintenance/EntityMaintenance.cs b/Src/Asp.Net/SqlSugar/Abstract/EntityMaintenance/EntityMaintenance.cs index 6bdcb014f..f8f629e11 100644 --- a/Src/Asp.Net/SqlSugar/Abstract/EntityMaintenance/EntityMaintenance.cs +++ b/Src/Asp.Net/SqlSugar/Abstract/EntityMaintenance/EntityMaintenance.cs @@ -171,7 +171,15 @@ namespace SqlSugar { return string.Empty; } - return xeNode.Element("summary").Value.ToSqlFilter().Trim(); + var summary = xeNode.Element("summary"); + if (summary != null) + { + return summary.Value.ToSqlFilter().Trim(); + } + else + { + return xeNode.Elements().Where(x=>x.Name.ToString().EqualCase("summary")).Select(it=>it.Value).FirstOrDefault().ToSqlFilter().Trim()??""; + } } /// /// Gets the code annotation for the database table