Hacker News new | ask | show | jobs
by xnorswap 1439 days ago
How is EF with postgres these days?

In the framework days it always used to come with a heavy dose of caution, but I'm expecting post-open source it's a lot better?

2 comments

My needs are pretty basic, so it's been fairly smooth sailing so far. I love that I can use EF to generate join tables without needing to create entity classes for them, while still retaining the ability to customize field/table names and such.

Back in the day I transitioned from coding to management in the period where Linq to SQL was being phased out, while EF was still very half-baked, so I've had a healthy dose of skepticism picking it up years later. But so far I'm quite impressed (while double checking that every query generates reasonable SQL).

We use it in production with no big complains. I'm a Dapper man myself but EF Core works fine with Postgres. Just add Npgsql.EntityFrameworkCore.PostgreSQL to your project, generate a migration script and add a Postgres container to your docker-compose.yml and you're off to the races. The migration scripts that are auto generate work well and are pretty safe for rolling forward.