DbDiagramIo.MsSql 1.1.0

Provides classes for drawing the DB diagram of an MS SQL database at https://dbdiagram.io/.

Install-Package DbDiagramIo.MsSql -Version 1.1.0
dotnet add package DbDiagramIo.MsSql --version 1.1.0
<PackageReference Include="DbDiagramIo.MsSql" Version="1.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DbDiagramIo.MsSql --version 1.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Draw a DB diagram of your MS SQL database

  • Draw a DB diagram of your MS SQL database.
  • Generate the diagram script directly from your MS SQL database.
  • Copy&paste the diagram script to https://dbdiagram.io.

Generate dbdiagram.io script

using DbDbiagramIo.MsSql;
(TableDto[] tables, ForeignKeyDto[] foreignKeys) = MsSqlSchemaReader.ReadTablesAndForeignKeysFromDb( "<YOUR-DB'S-CONNECTIONSTRING>" );

foreach (TableDto table in tables)
{
    Console.WriteLine( table.ToDbDbiagramCode() );
}

foreach (ForeignKeyDto fk in foreignKeys)
{
    Console.WriteLine( fk.ToDbDiagramDto() );
}

Draw a DB diagram of your MS SQL database

  • Draw a DB diagram of your MS SQL database.
  • Generate the diagram script directly from your MS SQL database.
  • Copy&paste the diagram script to https://dbdiagram.io.

Generate dbdiagram.io script

using DbDbiagramIo.MsSql;
(TableDto[] tables, ForeignKeyDto[] foreignKeys) = MsSqlSchemaReader.ReadTablesAndForeignKeysFromDb( "<YOUR-DB'S-CONNECTIONSTRING>" );

foreach (TableDto table in tables)
{
    Console.WriteLine( table.ToDbDbiagramCode() );
}

foreach (ForeignKeyDto fk in foreignKeys)
{
    Console.WriteLine( fk.ToDbDiagramDto() );
}

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.1.0 62 11/13/2019
1.0.0 50 11/12/2019