title: passing list to linq query
body: <p>I have a linq query that returns a list and the result looks like this:</p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)
  {
    var MyList = GetPatientsFromDB(TheUserID);
  }
  </code></pre>
  
  <p>This list is of type MyModel like this:</p>
  
  <pre><code>MyModel
  {
  public int PatientID {get;set;}
  }
  </code></pre>
  
  <p>Now what I'm looking to do is pass this list to a function called GetPatientInfo and return another list of MyOtherModel</p>
  
  <pre><code>MyOtherModel{
  public int PatientID {get;set;}
  public string Name {get;set;}
  public string Region {get;set;}
  }
  </code></pre>
  
  <p>I'm have some problems writing the second function.</p>
  
  <p>I started with </p>
  
  <pre><code>public static List&lt;MyOtherModel&gt; GetPatientInfo(List&lt;MyModel&gt;
  {
  
  using (..... MyDC = new... DataContext)
  
  {
       var OutputList = from f in MyDC.Table
                         where......?
  
  }
  </code></pre>
  
  <p>I'm stuck on writing the where clause and the calling statement. Thank you for suggestions.</p>