VOOZH about

URL: https://www.nuget.org/packages/EFCore.Migrations.AutoComments

⇱ NuGet Gallery | EFCore.Migrations.AutoComments 10.1.2




EFCore.Migrations.AutoComments 10.1.2

dotnet add package EFCore.Migrations.AutoComments --version 10.1.2
 
 
NuGet\Install-Package EFCore.Migrations.AutoComments -Version 10.1.2
 
 
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="EFCore.Migrations.AutoComments" Version="10.1.2" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="EFCore.Migrations.AutoComments" Version="10.1.2" />
 
Directory.Packages.props
<PackageReference Include="EFCore.Migrations.AutoComments" />
 
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add EFCore.Migrations.AutoComments --version 10.1.2
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: EFCore.Migrations.AutoComments, 10.1.2"
 
 
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package EFCore.Migrations.AutoComments@10.1.2
 
 
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=EFCore.Migrations.AutoComments&version=10.1.2
 
Install as a Cake Addin
#tool nuget:?package=EFCore.Migrations.AutoComments&version=10.1.2
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

EFCore.Migrations.AutoComments

👁 NuGet
👁 Downloads

Automatically applies database comments to tables and columns based on XML documentation. Comments flow from <summary> tags directly into migrations.

Installation

dotnet add package EFCore.Migrations.AutoComments

Prerequisites

Enable XML documentation generation in your project:

<PropertyGroup>
 <GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>

Registration

builder.Services.AddDbContext<AppDbContext>(options =>
 options
 .UseNpgsql(...)
 .UseAutoComments());

XML file path resolution

If no file is specified, XML docs are auto-discovered by assembly name.

// Auto-discover (default)
options.UseAutoComments();

// Single file
options.UseAutoComments("MyApp.xml");

// Multiple files - merges docs from several assemblies
options.UseAutoComments("MyApp.xml", "SharedLibrary.xml");

Example

/// <summary>
/// Represents an animal in the shelter.
/// </summary>
public class Animal
{
 /// <summary>
 /// Unique identifier.
 /// </summary>
 public int Id { get; set; }

 /// <summary>
 /// Animal name.
 /// </summary>
 public string Name { get; set; }

 /// <summary>
 /// Type of animal.
 /// </summary>
 public AnimalType Type { get; set; }
}

/// <summary>
/// Animal type.
/// </summary>
public enum AnimalType
{
 /// <summary>Dog.</summary>
 Dog,

 /// <summary>Cat.</summary>
 Cat,

 /// <summary>Fish.</summary>
 Fish
}

Generated migration comments:

COMMENT ON TABLE "Animals" IS 'Represents an animal in the shelter.';
COMMENT ON COLUMN "Animals"."Id" IS 'Unique identifier.';
COMMENT ON COLUMN "Animals"."Name" IS 'Animal name.';
COMMENT ON COLUMN "Animals"."Type" IS 'Type of animal.';

Enum descriptions

With options.UseAutoComments(o => o.AddEnumDescriptions()), the Type column comment becomes:

Type of animal.

0 - Dog.
1 - Cat.
2 - Fish.

For string-backed enums, the enum member name is used instead of the numeric value:

Status.

Active - Active account.
Suspended - Temporarily suspended.
Closed - Account closed.

Use [AutoCommentEnumDescription] on a property to enable enum descriptions for that property only, or [IgnoreAutoCommentEnumDescription] to exclude it when global mode is active.


License

MIT © Andrey Gavrilov 2026


Migrated from AndreqGav/EF.Toolkits.

Product Versions Compatible and additional computed target framework versions.
.NET net10.0 net10.0 is compatible.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.1.2 106 5/20/2026
10.1.1 101 5/19/2026
10.1.1-preview.4 57 5/19/2026
10.1.1-preview.1 56 5/2/2026
9.1.2 136 5/20/2026
9.1.2-preview.1 72 5/20/2026
9.1.1 111 5/19/2026
9.1.1-preview.4 58 5/19/2026
9.1.1-preview.3 59 5/19/2026
9.1.1-preview.2 60 5/19/2026
9.1.1-preview.1 57 5/19/2026
8.1.2 97 5/20/2026
8.1.1 94 5/19/2026
8.1.1-preview.4 51 5/19/2026
7.1.2 102 5/20/2026
7.1.1 93 5/19/2026
7.1.1-preview.4 52 5/19/2026
6.1.2 104 5/20/2026
6.1.1 96 5/19/2026
6.1.1-preview.4 55 5/19/2026
Loading failed