UmlKit 8.6.4

dotnet add package UmlKit --version 8.6.4
                    
NuGet\Install-Package UmlKit -Version 8.6.4
                    
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="UmlKit" Version="8.6.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="UmlKit" Version="8.6.4" />
                    
Directory.Packages.props
<PackageReference Include="UmlKit" />
                    
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 UmlKit --version 8.6.4
                    
#r "nuget: UmlKit, 8.6.4"
                    
#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 UmlKit@8.6.4
                    
#: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=UmlKit&version=8.6.4
                    
Install as a Cake Addin
#tool nuget:?package=UmlKit&version=8.6.4
                    
Install as a Cake Tool

UmlKit

Генерация UML/ER-диаграмм из EF Core DbContext в форматах PlantUML, Mermaid, текстовом и Draw.io.

Установка

dotnet add package UmlKit

API-справочник (класс UmlGenerator)

ToPlantUml(DbContext dbContext)

Генерирует диаграмму классов в формате PlantUML. Включает метки кардинальности (1:N, 1:1) на связях, а также маркеры PK/FK для свойств.

string plantUml = UmlGenerator.ToPlantUml(context);
File.WriteAllText("diagram.puml", plantUml);

ToMermaid(DbContext dbContext)

Генерирует ER-диаграмму в формате Mermaid. Включает метки кардинальности (1:N, 1:1) с использованием нотации Mermaid ER (||--|| для 1:1, ||--o{ для 1:N).

string mermaid = UmlGenerator.ToMermaid(context);
File.WriteAllText("diagram.md", mermaid);

ToText(DbContext dbContext)

Генерирует простую текстовую ER-диаграмму. Каждая сущность выводится с перечислением полей, типов и маркеров PK/FK.

string text = UmlGenerator.ToText(context);
Console.WriteLine(text);

ToDrawIo(DbContext dbContext)

Генерирует ER-диаграмму в формате Draw.io (.drawio XML). Файл можно открыть в diagrams.net / draw.io. Таблицы отображаются с выделением PK-полей и связями между сущностями.

string drawIo = UmlGenerator.ToDrawIo(context);
File.WriteAllText("diagram.drawio", drawIo);

SaveDrawIo(DbContext dbContext, string filePath)

Сохраняет ER-диаграмму в .drawio файл по указанному пути.

UmlGenerator.SaveDrawIo(context, "er_diagram.drawio");

Примеры использования

Генерация диаграмм во всех форматах

using UmlKit;
using Microsoft.EntityFrameworkCore;

using var context = new MyDbContext();

// PlantUML
string puml = UmlGenerator.ToPlantUml(context);
File.WriteAllText("diagram.puml", puml);

// Mermaid
string mermaid = UmlGenerator.ToMermaid(context);
File.WriteAllText("diagram.mermaid", mermaid);

// Текстовый формат
string text = UmlGenerator.ToText(context);
File.WriteAllText("diagram.txt", text);

// Draw.io
UmlGenerator.SaveDrawIo(context, "diagram.drawio");

Вывод текстовой диаграммы в консоль

using var context = new MyDbContext();
Console.WriteLine(UmlGenerator.ToText(context));

// Пример вывода:
// --- Employee ---
//   Id : int [PK]
//   Name : string
//   DepartmentId : int [FK]
//
// --- Department ---
//   Id : int [PK]
//   Name : string
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  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 (1)

Showing the top 1 NuGet packages that depend on UmlKit:

Package Downloads
ISBuilder

Information System Builder — full toolkit for building .NET 8 WinForms applications with EF Core, SQL Server. Export, CRUD, forms, charts, auth, reports, validation, themes.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
8.6.4 134 4/12/2026
8.6.0 106 4/12/2026