Getting started with NHibernate 3.2 Loquacious API
Asked Answered
R

2

27

I'm starting a new project and I want to use NHibernate 3.2. I know that it can now do something similar to FluentNHibernate and I want to give it a try.

But I am having a hard time finding documentation on the Loquacious API. I've seen blog posts on how to configure the ISessionFactory, but I'm getting lost after this. I know that the 3.2 API is moving fast and that article about 3 to 4 months old are already out of date, but I'm looking for the most recent information.

Where can I find the resources concerning:

  • How to setup NHibernate 3.2 without using XML, without using FluentNHibernate and without using ConfORM?

  • How to register the mappings?

  • How to create conventions?

Please remember that this is concerning NHibernate 3.2 (and probably above). If any of the concepts like mappings and conventions no longer apply, please can you point me into the right direction?

I have some experience with NHibernate and FluentNHibernate as I used them for a small project, but it was not very complicated.

Rarefy answered 14/6, 2011 at 19:5 Comment(1)
You may get a better response if you ask this question on link nhuser.Eulogium
P
45

I'm already trying to fill that hole in mapping-by-code documentation and examples with the series of posts on my blog. I'm trying to see what is supported and to compare mapping-by-code possibilities with Fluent NHibernate. Here are the posts:

  1. First impressions
  2. Naming convention resembling Fluent
  3. Property
  4. Component
  5. ManyToOne
  6. inheritance
  7. dynamic component
  8. Set and Bag
  9. OneToMany and other collection-based relation types
  10. concurrency
  11. OneToOne
  12. Join
  13. Any
  14. List, Array, IdBag
  15. Map
  16. Id, NaturalId
  17. composite identifiers
  18. entity-level mappings
  19. the summary
Pinder answered 7/2, 2012 at 20:37 Comment(1)
thanks for this! You have given me the confidence to make the switch from FNH. I started with hbm.xml then switched to FNH and corrupted my hbm.xml knowledge. Now I feel I need to relearn the hbm.xml to use the mapping-by-code. lol.Flaky
F
8

I created a video for just this and posted it on youtube, you can find the link to it here, see Lesson 13. You can also download the source code here. I hope they provide the information you are searching for.

Faqir answered 6/7, 2011 at 5:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.