title: Using LINQ .Join() method
body: <p>I'd like to use the <code>.Join()</code> method in LINQ to perform the following SQL:</p>
  
  <p><code>select * from Enquiries e, QuoteLines q where e.EnquiryId = q.EnquiryId and e.AccountNum = '123' and q.LineNumber = 'ABC123'</code></p>
  
  <p>The parameters used for <code>AccountNum</code> and <code>LineNumber</code> will be dynamically passed to the method.</p>
  
  <p>How would I transfer this to use the LINQ <code>.Join()</code> method?</p>
  
  <pre><code>public ActionResult EnquirySearch(string id)
  {
      var enquiries = new List&lt;Enquiries&gt;();    
  
      if(id.Contains(' '))
      {
          string[] searchArr = id.Split(' ');
          // want to do my LINQ here
          // this will be split so the first element in the array is the AccountNum
          // and the second element in the array is the LineNumber
      }
      else
      {
          enquiries = context.Enquiries.Where(x=&gt;x.QuoteRef.Contains(id) 
          || x.AccountNum.Contains(id) || x.Owner.Contains(id));
      }
      return View(enquiries);
  }
  </code></pre>