title: Generic method how to return all of type T
body: <p>say I have the following code:</p>
  
  <pre><code>public class Pond
  {
    public List&lt;Frog&gt; Frogs { get; set; }
    public List&lt;MudSkipper&gt; MudSkippers { get; set; }
    public List&lt;Eel&gt; Eels { get; set; }
  }
  
  public class Frog: IAquaticLife
  {
  
  }
  
  
  
  public class MudSkipper: IAquaticLife
  {
  
  }
  
  
  
  public class Eel: IAquaticLife
  {
  
  }
  </code></pre>
  
  <p>Now I want to write a generic method that will for a certain pond return the list of these types:</p>
  
  <pre><code>public IEnumerable&lt;T&gt; GetByPond&lt;T&gt;(int pondId) where T : IAquaticLife
  {
     return Uow.GetByID&lt;Pond&gt;(pondId).Eels;
  }
  </code></pre>
  
  <p>Ok, so what I have there will return all the eels in that pond. What I was wanting to do was to return all the T's.</p>
  
  <p>so if I called <code>GetByPond&lt;MudSkipper&gt;(1)</code> that would return all the mudskippers.</p>
  
  <p>Anyone know how to do this?</p>