These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: combo box data binding
PostPosted: Sun Sep 20, 2009 6:00 am 
Newbie

Joined: Sun Jun 08, 2008 9:58 pm
Posts: 3
I looking at using NHibernate for a 2 tier application and trying to get more info on sucessful strategies for binding nhibernate data model to a windows forms or wpf UI.

One question I have is how to implement the tion of referenced entities using combo boxes.
Lets say I have an object repsenting an order and it has a reference to a customer object.
I want to have a form to create an order I want to have a combo to select the customer.
To set the customer on the order object I need to set the the Customer field to an instance of a Customer object (or proxy).
So if I want to use databinding it seems I need to fill my combo with Cutomer instances or proxies.
If if I use the the full object it seems to a little heavy retreive the full details of all he customer objects from the database when the only info I use is the description to display to the user. I the "old days" you would just load the Description and CustomerId fields from the DB to populate the combo.
But I don't think I can proxies because then I won't have the description.

Is there a smarter way of doing this?
Are there any examples of nhibernate applications with .net UIs that I can download?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.