DM database bug

This commit is contained in:
skx
2020-12-29 11:43:57 +08:00
parent 809ad2b6a8
commit 6e0078a905
2 changed files with 12 additions and 1 deletions

View File

@@ -98,6 +98,9 @@ namespace SqlSugar
new KeyValuePair<string, CSharpDataType>("decimal",CSharpDataType.@decimal),
new KeyValuePair<string, CSharpDataType>("decimal",CSharpDataType.Single),
new KeyValuePair<string, SqlSugar.CSharpDataType>("double precision",CSharpDataType.@double),
new KeyValuePair<string, SqlSugar.CSharpDataType>("binary", CSharpDataType.@byteArray),
new KeyValuePair<string, CSharpDataType>("varchar",CSharpDataType.@string),
new KeyValuePair<string, CSharpDataType>("varchar",CSharpDataType.@Guid),
new KeyValuePair<string, CSharpDataType>("varchar2",CSharpDataType.@string),

View File

@@ -433,7 +433,15 @@ namespace SqlSugar
this.Context.Ado.IsEnableLogEvent = oldIsEnableLog;
return pks;
});
return comments.HasValue() ? comments.First(it => it.DbColumnName.Equals(filedName, StringComparison.CurrentCultureIgnoreCase)).ColumnDescription : "";
if (comments.HasValue())
{
var comment = comments.FirstOrDefault(it => it.DbColumnName.Equals(filedName, StringComparison.CurrentCultureIgnoreCase));
return comment?.ColumnDescription;
}
else
{
return "";
}
}