Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zhamppx97/minimalcli
MinimalCLI - This tool generates C# class files from database tables for Microsoft SQL Server, MySQL, Oracle, and PostgreSQL.
https://github.com/zhamppx97/minimalcli
class cli dotnet minimal mssql mysql oracle postgresql table table2cs
Last synced: about 1 month ago
JSON representation
MinimalCLI - This tool generates C# class files from database tables for Microsoft SQL Server, MySQL, Oracle, and PostgreSQL.
- Host: GitHub
- URL: https://github.com/zhamppx97/minimalcli
- Owner: zhamppx97
- License: mit
- Created: 2024-06-14T17:39:07.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-06-14T18:42:01.000Z (5 months ago)
- Last Synced: 2024-10-12T07:03:17.098Z (about 1 month ago)
- Topics: class, cli, dotnet, minimal, mssql, mysql, oracle, postgresql, table, table2cs
- Language: C#
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.txt
Awesome Lists containing this project
README
# 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
```bash
MinimalCLI:~$ dotnet packSuccessfully created package 'your-path\MinimalCLI\nupkg\MinimalCLI.1.0.0.nupkg'.
``````bash
MinimalCLI:~$ dotnet tool install --global --add-source ./nupkg MinimalCLIYou can invoke the tool using the following command: table2cs
Tool 'minimalcli' (Version '1.0.0') was successfully installed.
``````bash
MinimalCLI:~$ table2cs --helpUsage: SqlTableToClass [--output ]
Supported database types:
mssql Microsoft SQL Server
mysql MySQL
oracle Oracle
postgresql PostgreSQLExample:
SqlTableToClass mssql "Server=yourServerAddress;Database=yourDataBase;User Id=yourUsername;Password=yourPassword;TrustServerCertificate=True" --output "C:\OutputDirectory"
```## Example
mssql
```bash
MinimalCLI:~$ table2cs mssql "Server=yourServerAddress;Database=yourDataBase;User Id=yourUsername;Password=yourPassword;TrustServerCertificate=True" --output "C:\OutputDirectory"
```
mysql
```bash
MinimalCLI:~$ table2cs mysql "Server=myServerAddress;Database=myDataBase;User=myUsername;Password=myPassword;" --output "C:\OutputDirectory"
```
oracle
```bash
MinimalCLI:~$ table2cs oracle "Data Source=myOracleDB;User Id=myUsername;Password=myPassword;" --output "C:\OutputDirectory"
```
postgresql
```bash
MinimalCLI:~$ table2cs postgresql "Host=myServerAddress;Database=myDataBase;Username=myUsername;Password=myPassword;" --output "C:\OutputDirectory"
```