❔ postgres EF core, how to have a custom connection string config file
Hey, I have a net6 class library with a
DbContext
, I want to have the connection string in a separate custom config file, code below.
For some reason, when I do dotnet ef database update
, an error pops up:
My connection string looks like this: User ID=postgres;Password=<PASSWORD>;Host=localhost;Port=5432;Database=NetSendHost;Pooling=true;Min Pool Size=0;Max Pool Size=250;Connection Lifetime=0;
9 Replies
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
no it's a class library, and I also want the file containing the connection string to be separate
lemme try
same error when I put the raw string in the options @Deleted User
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
could you tell me what is wrong with this one if you know postgres?
User ID=postgres;Password=<PASSWORD>;Host=localhost;Port=5432;Database=NetSendHost;Pooling=true;Min Pool Size=0;Max Pool Size=250;Connection Lifetime=0;
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Ok
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
yeah constr was crooked
thanks
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.