Skip to content

feat: entity framework core schema generation - #11

Merged
Stephanvs merged 1 commit into
mainfrom
feature/ef-sql-diagram
Aug 9, 2026
Merged

feat: entity framework core schema generation#11
Stephanvs merged 1 commit into
mainfrom
feature/ef-sql-diagram

Conversation

@Stephanvs

Copy link
Copy Markdown
Owner

What changed

  • adds a separate D2Lang.EntityFrameworkCore NuGet package targeting .NET 8 and .NET 10
  • converts EF Core relational models into typed D2 SQL tables, constraints, and foreign-key connections
  • adds AddD2Schema<TContext> for automatic startup generation and ToD2Diagram() for direct use
  • resolves relative output paths from the host content root, writes atomically, and skips unchanged files
  • adds documentation, CI package validation, release publishing, and parser-backed tests

Why

Database diagrams should remain synchronized with the EF Core model instead of being maintained manually. The integration reads EF metadata without connecting to the database and produces source that can be rendered by the D2 CLI.

Validation

  • multi-target Release build: 0 warnings, 0 errors
  • tests: 37/37 passed, including real d2 validate
  • NuGet package validation and .nupkg/.snupkg inspection passed
  • clean .NET 8 and .NET 10 consumer builds passed
  • NuGet vulnerability audit found no vulnerable dependencies
  • simulated 2.0.0 release preserved the correct d2lang-cs package dependency

Dependency

PR #5 is merged; this branch is based on its merge commit.

@Stephanvs
Stephanvs marked this pull request as ready for review August 9, 2026 12:44
@Stephanvs
Stephanvs merged commit 08c1ef4 into main Aug 9, 2026
3 checks passed
@Stephanvs Stephanvs changed the title Add Entity Framework Core schema generation feat: entity framework core schema generation Aug 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant