EzDbSchema 7.0.0

.NET 5.0 .NET Core 2.2 .NET Standard 2.0 .NET Framework 4.6.1
dotnet add package EzDbSchema --version 7.0.0
NuGet\Install-Package EzDbSchema -Version 7.0.0
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="EzDbSchema" Version="7.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add EzDbSchema --version 7.0.0
#r "nuget: EzDbSchema, 7.0.0"
#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.
// Install EzDbSchema as a Cake Addin
#addin nuget:?package=EzDbSchema&version=7.0.0

// Install EzDbSchema as a Cake Tool
#tool nuget:?package=EzDbSchema&version=7.0.0

EZDBSchema - Easy Database Schema

A class library that alllows you to point to a database and obtain a schema dump complete with columns, relationships (including fk names and multiplicity). Some use cases require a schema of a database without the bulk of Entity power tools or Entity Framework.

Included in the project is a handy command line interface that can be used to dump the schema of the database to a json file.

The idea is to obtain the database schema informtion as close to the source as possible. All of the schema definitions can be obtain from the database itself, with a little sluething, we can derive that information we need quickly and deliver it into a usable object heirarchy.

One possible use of this is for code generation based on database objects.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

You will need MSSQL with some database installed. If you need a sample database, feel free to look for the World Wide Importers samples.

Using this project:

From NuGet
  1. Install-Package EzDbSchema.Core
  2. Add the following line of code
var schema = new EzDbSchema.MsSql.Database().Render("MySchema", "Server=???;Database=???;user id=sa;password=sa");
  1. Run the app
As Cli
  1. Change EzDbSchema.Cli/appsettings.json ConnectionString to the proper database authentication credentials.
  2. run the application. A file called MySchemaName.db.json will be written to the EzDbSchema.Cli folder

Deployment

This project was design to be hosted and distributed with nuget.com.

Built With

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

Many thanks to the following projects that have helped in this project

  • McMaster.Extensions.CommandLineUtils

Release Notes

V 7.0.0 - Nuget package upgrades, updated to .net 7.0

V 6.0.1 - Added the ability to tell the generator to not auto create the primary keys if they are missing

V 6.0.0 - Migration to .net 6.0

Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows
.NET Core netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.0 netstandard2.1
.NET Framework net461 net462 net463 net47 net471 net472 net48 net481
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen40 tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on EzDbSchema:

Package Downloads
EzDbCodeGen

This complete and self contained code generation utility will install in a sub directory EzDbCodeGen of a target project. From this path, you can run a powershell script that will generate code based on the connection string. Each template is a handlebars template that has tags that specify where you would like to output the generated code and if there is a vs project that you wish to update with the file list (old VS project formats only).

EzDbCodeGen.Core

This will install a local cli tool. From this path, you can run a powershell script that will generate code based on the connection string. Each template is a handlebars template that has tags that specify where you would like to output the generated code and if there is a vs project that you wish to update with the file list (old VS project formats only).

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
7.0.0 156 1/2/2023
6.0.1 519 4/27/2022
6.0.0 6,479 11/23/2021
5.0.9 251 9/7/2021
5.0.8 230 9/6/2021
5.0.7 333 6/20/2021
1.0.53 566 5/13/2020
1.0.31 735 12/21/2019
1.0.29 433 8/30/2019
1.0.28 723 6/6/2019
1.0.27 465 6/5/2019
1.0.26 652 2/22/2019
1.0.23 736 8/24/2018
1.0.22 681 8/20/2018
1.0.21 723 8/16/2018
1.0.16 723 8/1/2018
1.0.15 731 7/27/2018
1.0.11 1,947 7/20/2018

Updated all Nuget packages and added .net 7