Solution for me was simply using host.docker.internal instead of localhost in your connection string.
https://github.com/npgsql/Npgsql.EntityFrameworkCore.PostgreSQL/issues/225
Solution for me was simply using host.docker.internal instead of localhost in your connection string.
https://github.com/npgsql/Npgsql.EntityFrameworkCore.PostgreSQL/issues/225