title: How to convert sql query to entity framework core
body: <p>I want to convert sql query to entity framework core.
  SQL query is</p>
  
  <pre><code>select * from Departments where id in(select DepartmentId from SubDepartments where id in(select SubDeptId from Tests where id in(select TestId from PatientTests where PatientId=3)))
  </code></pre>