Skip to content

MinimalCLI - This tool generates C# class files from database tables for Microsoft SQL Server, MySQL, Oracle, and PostgreSQL.

License

Notifications You must be signed in to change notification settings

zhamppx97/MinimalCLI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MinimalCLI

This tool generates C# class files from database tables for Microsoft SQL Server, MySQL, Oracle, and PostgreSQL.

Functionality

  • Connects to the specified database.
  • Retrieves table schemas.
  • Generates C# class files with properties for each column.
  • Includes column descriptions if available.

Usage

MinimalCLI:~$ dotnet pack

Successfully created package 'your-path\MinimalCLI\nupkg\MinimalCLI.1.0.0.nupkg'.
MinimalCLI:~$ dotnet tool install --global --add-source ./nupkg MinimalCLI

You can invoke the tool using the following command: table2cs
Tool 'minimalcli' (Version '1.0.0') was successfully installed.
MinimalCLI:~$ table2cs --help

Usage: SqlTableToClass <database_type> <connection_string> [--output <directory>]

Supported database types:
  mssql       Microsoft SQL Server
  mysql       MySQL
  oracle      Oracle
  postgresql  PostgreSQL

Example:
  SqlTableToClass mssql "Server=yourServerAddress;Database=yourDataBase;User Id=yourUsername;Password=yourPassword;TrustServerCertificate=True" --output "C:\OutputDirectory"

Example

mssql

MinimalCLI:~$ table2cs mssql "Server=yourServerAddress;Database=yourDataBase;User Id=yourUsername;Password=yourPassword;TrustServerCertificate=True" --output "C:\OutputDirectory"

mysql

MinimalCLI:~$ table2cs mysql "Server=myServerAddress;Database=myDataBase;User=myUsername;Password=myPassword;" --output "C:\OutputDirectory"

oracle

MinimalCLI:~$ table2cs oracle "Data Source=myOracleDB;User Id=myUsername;Password=myPassword;" --output "C:\OutputDirectory"

postgresql

MinimalCLI:~$ table2cs postgresql "Host=myServerAddress;Database=myDataBase;Username=myUsername;Password=myPassword;" --output "C:\OutputDirectory"

About

MinimalCLI - This tool generates C# class files from database tables for Microsoft SQL Server, MySQL, Oracle, and PostgreSQL.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages