Entity Framework Core 6 will scaffold SQL Server table and column comments when using the database first approach

When using the database first approach Entity Framework Core 6 will scaffold SQL Server table and column comments into the generated C# models.

To add a comment to a column there’s a property called ‘Description’ in the column properties screen. For tables you need to add an extended property called ‘MS_Description’ from the table properties screen as shown below.

And remember… don’t just duplicate the what. Comments should only be needed occasionally and are usually more useful when they describe why something is the way it is. Agree?

Note – this feature was contributed by ErikĀ EjlskovĀ Jensen who is the author of the amazing EF Core Power tools extension.

Leave a Reply

Your email address will not be published. Required fields are marked *