.NET scaffold entities from Postgres database
- Get .NET6 https://dotnet.microsoft.com/en-us/download/dotnet/6.0
- Right click on a project and choose Publish, then select profile according to your OS ( win/linux/osx x64 ) and click finish.
- Go to bin\Release\net6.0\publish\win-x64 folder and find PgEntityGenerator.exe
- Run exe with specified arguments: connection_string schema_name table_name
Example to run via powershell: .\PgEntityGenerator.exe "Server=localhost;Port=5432;Database=test;User ID=postgres;Password=****;CommandTimeout=300;" "tschema" "table"
- Find *Entity.cs *Map.cs files next to exe file.