Hot to connect to PGSQL from core app

I am building core entity framework app and not able to configure connection string in appsettings.json file. Any one who can help?


The Render Postgres docs show how the connection strings provided break down into their component parts:

  • Database = DATABASE
  • Host/Server = HOST
  • User Name/User ID = USER
  • Port = 5432 (Postgres default)
  • Password = PASSWORD

And if you’re connecting from outside of Render, SSL is required:

  • SSL Mode = “require”

I’m not familiar with .NET, but it should be a case of putting those values into the format the appsettings.json expects. A quick search brought up various guides, like this one:

Which shows the connection string as:

User ID=root;Password=myPassword;Host=localhost;Port=5432;Database=myDataBase;

So using the details from the Render-provided connection string above, that would be something like

User ID=USER;Password=PASSWORD;Host=HOST;Port=5432;Database=DATABASE;


1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.