diff --git a/Providers/FreeSql.Provider.SqlServer/SqlServerDbFirst.cs b/Providers/FreeSql.Provider.SqlServer/SqlServerDbFirst.cs index ec9a39d0b..828214f40 100644 --- a/Providers/FreeSql.Provider.SqlServer/SqlServerDbFirst.cs +++ b/Providers/FreeSql.Provider.SqlServer/SqlServerDbFirst.cs @@ -278,7 +278,7 @@ when b.name in ('nchar', 'nvarchar') then cast(a.max_length / 2 as varchar) else cast(a.max_length as varchar) end + ')' when b.name in ('numeric', 'decimal') then '(' + cast(a.precision as varchar) + ',' + cast(a.scale as varchar) + ')' else '' end as 'sqltype' -,( select value from sys.extended_properties where major_id = a.object_id AND minor_id = a.column_id AND name = 'MS_Description') 'comment' +,( select value from sys.extended_properties where major_id = a.object_id AND minor_id = a.column_id AND name = 'MS_Description' and class=1) 'comment' {0} a inner join sys.types b on b.user_type_id = a.user_type_id left join sys.tables d on d.object_id = a.object_id @@ -524,4 +524,4 @@ public List GetEnumsByDatabase(params string[] database) return new List(); } } -} \ No newline at end of file +}