Replies: 4 comments 1 reply
-
Thanks for your input @ah1508, however, that is more a discussion than an issue as this is not really actionable. |
Beta Was this translation helpful? Give feedback.
-
Theses features should be considered for 6.0 I think. |
Beta Was this translation helpful? Give feedback.
-
I agree with all the points bring by the OP. Especially the lack of documentation for mapping by code. How could we help with this, specifically? |
Beta Was this translation helpful? Give feedback.
-
How about contacting the author of http://notherdev.blogspot.com/2012/02/nhibernates-mapping-by-code-summary.html ? Maybe some parts must be rephrased, but it's better than writing everything from scratch. For the time being it is the most accurate source of documentation. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
EF Core is catching up and even if Nhibernate still have unique and more advanced features, the lack of
does not help onboarding for new comers.
Suggestions:
The
ConventionalModelMapper
could registerClassMapping
by introspection, like for hbm.xml files.It would avoid this kind of boilerplate:
The integration with modern dotnet standards (ILogger, IConfiguration) could be built-in. The default setup still relies on hibernate.cfg.xml while
IConfiguration
abstraction has beeen the standard for many years now.Coupling with
ILogger
requires an extension (NHibernate.Extensions.Logging
) while it could also be built-in.To sum up, I'd love to see that:
where
configuration
is an instance ofIConfiguration
with aNHibernate
section.Implémentation proposal of this method:
I also think that a "transactional session context" should be added (see #1907 (comment)).
TransactionScope
is a bit forgotten but remains a neutral way to surround a unit of work. It does not dispose asynchronously but all other implementations ofICurrentSessionContext
have also their drawbacks.My point: it's a pity if NHibernate, which is not as popular as EFCore despite several more advanced features, gives the feeling to be behind modern dotnet because of a few details.
Beta Was this translation helpful? Give feedback.
All reactions