Geeks With Blogs
Bob Palmer's Developer Blog .NET, SQL, and Silverlight Development

For this third tutorial, we'll be introducing users new to NHibernat to basic object relationships, starting with a simple many-to-one relationship. 

I decided that it would make sense to at least get the readers through some basic relationship mapping (including varieties of parent/child and many to many relationships) before diverging into UI, since most folks are looking for enough to bootstrap themsevles into using NHibernate, and this almost always means some kind of relation between their objects.

You can find a link to the article at:

http://docs.google.com/Doc?docid=0AUP-rKyyUMKhZGczejdxeHZfMjJmM3c3M3Bnbg&hl=en

As always, comments, corrections, and suggestions are appreciated!

-Bob

Posted on Friday, April 23, 2010 9:56 PM | Back to top


Comments on this post: Mapping Object Relationships - QuickStart with NHibernate (Part 3)

# re: Mapping Object Relationships - QuickStart with NHibernate (Part 3)
Requesting Gravatar...
Very nice work. This is one of the better introductions I have seen. I think you doing a great job of introducing just enough details to teach the concepts. A lot of intro tutorials go overboard with NHibernate internals IMHO. Those details eventually need to be revealed, but all in due time I say.
Left by Daniel Auger on Apr 28, 2010 11:35 AM

# re: Mapping Object Relationships - QuickStart with NHibernate (Part 3)
Requesting Gravatar...
Thanks Daniel,

And yep, one of the intentions was to slowly take folks through all of the details one concept at a time vs. toss them into the whole mix at once (one of the reasons there is no UI work yet).

Relationships alone will end up being a few more articles, but by the time we end up in the actual reference material, folks should have a really good grounding.
Left by Bob Palmer on Apr 28, 2010 11:52 AM

# re: Mapping Object Relationships - QuickStart with NHibernate (Part 3)
Requesting Gravatar...
MORE!!

Agreed; you're getting across some subtle but important design practices here. That is *much* more important to me than details that distract when out of context.

Keep up the good work
Left by Berryl on May 06, 2010 4:35 PM

# re: Mapping Object Relationships - QuickStart with NHibernate (Part 3)
Requesting Gravatar...
Why do you have a SaveUom method in the ProductRepository class?

I would think that having a save method in the UomRepository class would be better. Say I have a maintenance screen in my app and I want to add a new UoM (ie box). I have to create a product repo first then use it to save "Box". Doesn't quite make sense.

Then maybe keep SaveUom in ProductRepository but have it call UomRepository.
Left by Sam on Jul 01, 2010 10:27 AM

Your comment:
 (will show your gravatar)


Copyright © BobPalmer | Powered by: GeeksWithBlogs.net | Join free