DbContextFactory check for valid connection on app startup
I have a .NET app where I'm currently using EF Core's DbContextFactory with Postgres. However I noticed that no matter what host I set in my connection string the app starts normally and no errors are thrown. Is it possible to validate the connection at startup?
1 Reply
I ended up solving it like this
Program.cs