Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Relationship mapping in EF is the most confusing part. I consider myself pretty competent with EF and still trip on this aspect of it.
-
ef is a shit solution in search of a problem, shoehorning it into projects just because a manager read about it on the internet does absolutely nothing useful and makes everything a fucking nightmare to work on.
-
@tosensei what I actually needed was just a table with two fields, which make up a compound key.
What I ended up doing was defining a parent and child with a one to many relationship.
Partly cos the team insisted on that, I had the simpler version working.
But then I spent ages figuring out why I was getting orphaned children and didn’t realise I had to enable cascading deletes, even tho I’m never deleting the parent.
Having spent the last few years doing mongoDB, what I once new about EF (which was before the core version) now seems alien.
I fucking hate entity framework.
It turns 10 mins of work into fucking hours of stress and bloat and shit.
It’s the one thing in dotnet that I cannot fucking stand.
Literally did a bit of work in 10 mins (using ef I might add), but because it’s not the”ef way” I need to create an extra table/class and then fuck about mapping the relationship in a complicated way to do what I had just done in only a few lines of code with one table.
Spend over an hour trying to get it to understand the relationship before I gave up for the day. Fuck it
rant