+1  A: 

Hi Damien,

I wrote two blog entries about one approach to handling this situation - it applies to ASP.net, but it might help you out.

Here are the posts, the first one is more of an introduction to the problem, the second entry shows how to pin it all together.

I'm not sure whether this qualifies as "the correct way" but it's certainly an approach :) I'd be happy to hear back if this helps you out!

Edit: After reading danbruc's answer, you can certainly override ToString on the Navigation property as he has suggested (for read only), but that's only a partial answer.

This won't work unless your LINQ query contains the "Include" statement, e.g.

var listOfThings = (from t in db.Thingy
                    .Include("DataConfidenceLevel")
                    select t).ToList();

Omitting the .Include() means that nothing will get bound to the column.

RobS
I am not a ASP developer, but your way of displaying releated entities in data bound controls seems way to complex. I will lay odds on ASP handling data bound entities with overwritten ToString() method the same way as WinForms does.
Daniel Brückner
True, but I'm not sure what you'll have to do for making changes/updating the entity
RobS
I'll try the ToString approach and see if I run into any road blocks (there's still the issue of ensuring the navigation member is loaded or not).
RobS
+1  A: 

You want to bind a collection to a control and have a releated entity - namely navigation property DataConfidenceLevel of type DataConfidenceLevel - as the display member?

That is usually achieved really simple by overriding ToString(),

public partial class DataConfidenceLevel
{
   public override String ToString()
   {
      return this.ConfidenceDescription;
   }
}

and than setting DisplayMember to the DataConfidenceLevel property of the entity you want to bind.

Daniel Brückner
I'm tearing my hair out trying to get this to work. I can't believe that something that should be so simple is so difficult.I've overridden the ToString method on the DataConfidenceLevel class but what exactly do I use for the datasource for the combobox and what display/value members do I use?
Damien
+1  A: 

The answer was simpler than I was expecting.

    comboBox.DataBindings.Add(new Binding("SelectedItem", this.dataBindingSource, "DataConfidenceLevel", true));
    comboBox.DataSource = db.DataConfidenceLevel;
    comboBox.DisplayMember = "ConfidenceDescription";
    comboBox.ValueMember = "ConfidenceLevelID";
Damien