title: inner join query in asp.net MVC4
body: <p>I write query about search about specific employee but did'nt work ,I know there is an error in my query but did'nt now where it.
  I have 2 tables one for company and another for employee info.
  the progress will be:</p>
  
  <ul>
  <li>1'st Query search in company table by department number and company
  number then get the <code>PK_companyID</code> .</li>
  <li>2'ed JOIN company.<code>PK_companyID==employee.FK_companyID</code>.</li>
  <li>3'ed Query will search in employee table by <code>FK_companyID</code> when the
  name enter will be the same in <code>employee table</code>.</li>
  </ul>
  
  <p>I hope its Clear to understand</p>
  
  <pre><code> var query = (from c in db.Company
              where c.departmentNO== departmentNumber &amp;&amp; c.companyNo==companyNumber
              join x in db.Employee c.PK_companyID==x.FK_companyID
              where (x.FirstName.Contains(firstName ?? x.FirstName)
              &amp;&amp; x.SecondName.Contains(secondName ?? x.SecondName)
              &amp;&amp; x.ThirdName.Contains(thirdName ?? x.ThirdName)
              &amp;&amp; x.FourthName.Contains(fourthName ?? x.FourthName))
              select x).ToList();
  </code></pre>
  
  <p>Thank in advance.</p>