linq entityref and getter
<p>I have the following entity classes (c#):</p>

<pre><code>class Speed {
   string speedNameDesc;
   string speedId;
}

class Drive {
   string _speedId;
}
</code></pre>

<p>which map to speed and drive tables respectively. Drive table has a foreign key (speed_id) referencing to Speed table.</p>

<p>Now I want to display and bind the Drive entity to the html using, say, DataRow. But I also want that all the IDs (eg. speed id) should be converted to human readable form; ie, instead of showing speedId I want to show the speedNameDesc which is not part of the Drive table. So I want to create some generated property in Drive entity like this:</p>

<pre><code>class Drive {
  EntityRef&lt;Speed&gt; _speed;
  public string driveNameDesc {
     get {
        return from this._speed.Entity.speedNameDesc; 
     }
  }
}
</code></pre>

<p>Obviously the linq to sql thingy is incorrect and my current problem involves writing it correctly so that it works.</p>

<p>Would appreciate greatly if someone can help with the correct linq query.</p>

<p>Thanks</p>
