Hacker News new | ask | show | jobs
by romanhn 1431 days ago
Not exactly a startup (yet?), but I'm using .NET 6 in my side project to build the API backing a React SPA. It was funny arriving at it, because I started out by trying to choose between Python and Elixir, having left the Microsoft ecosystem 10 years ago (and vowing not to return to it). At the end of the day, .NET bubbled up to the top as the sweet spot of familiarity, maintainability due to strong typing, integration into the open source ecosystem, and ease of hiring should that ever become a concern (premature optimization, but still).

I just use it on the backend along with Entity Framework, a pretty neat ORM, and do my best to avoid lock-in into the rest of the Microsoft monoculture. Using Postgres for data, AWS for hosting, React with Vite for frontend because I would never trust MS to get that aspect right with their endless iteration of UI frameworks both on web and desktop.

1 comments

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?

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.