简体   繁体   中英

Config PostgreSQL connection string for ASP.NET Core 5.0 - EF Core 5.0 Web App to run on MS or Linux cloud?

I'm counting on being able to use PostgreSQL 10-13 with NPGSQL drivers and the NPGSQL EF Core 5.0 Provider for deployment to Azure Web Apps and AWS Linux.

However, the NPGSQL docs focus on developer issues and are limited regarding details like connection strings and other tricky basics.

ConnectionStrings.com provides only simple samples of PostgreSQL connection strings and no diagnostic info.

Can anyone clue me into basic stuff like, what values are appropriate for a 'host name' in a Postgresql NPGSQL connection string when I'm in a Microsoft environment vs a Linux environment?

I'm trying to stay away from ODBC and OLE DB or other ADO.NET era tech.

Big thanks for any other clues like where and by whom is this itchy information is available?

A host name is just a standard DNS hostname (eg server.domain.com ), or an IP address.

This page in the Npgsql docs lists the various connection strings, with the basic ones at the top. The getting started page shows a typical basic example of a connection string too.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM