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
Search - "nhibernate"
-
New day. New legacy project that needs triage.
The project has existed since before 2000 so it all "works" and has no known business logic bugs. It does however have performance issues which sure I can have a look. It can actually be quite fun and rewarding to optimize performance.
This is a titanic dotnet framework leviathan consisting of over 12,000 cs files using razorpages, entity framework, and... nhibernate? I have my gripes with both EF and NH but they are both fine if used correctly, like any other tool. I've never seen them used together however.
As It Turns Out™, NH was implemented first and at a time when NH did not support async operations. It made sense if you look it up and it's meant to delegate commands via a separate layer, but different story.
Then for... reasons... EF came in and gradually took over.
Because of the way this is all set up, everything will faceplant if you try doing anything async, even if it has nothing to do with calling the db. Any attempt in making this work leads you down a slippery slope of having to rewrite the entire thing, which is out of the question in terms of their budget and expectations.
Sometimes it's a detriment when it works in spite of its issues.1 -
Just spent the last hour going through code and nHibernate relationship mappings only to realise that my repository's create method had an not exists check instead of an exists check preventing it from actually committing the data ........... i'm tired and need a holiday !
-
Fucking Fluent NHibernate with it's stupid fucking explicit empty constructors. WHY? JUST FUCKING USE THE DEFAULT CONSTRUCTOR YOU MONG LIBRARY!!! And also, why the holy fuck do my field setters need to be PROTECTED INSTEAD OF PRIVATE??? WHY THE FUCK?
-
Stupid Nhibernate! Half day to get a domain configuration barely working! I hate you.
P.s.
Someone know some resource to learn about Nibernate by the code? It seems awesome and I'm a noob.