title: ServiceStack JOIN 3 tables
body: <p>it is possible to join more than 2 tables with ServiceStack?
  I tried something like that but I need to link evrything:</p>
  
  <pre><code>// Join PatientDetails and BedDetails
  SqlExpression&lt;PatientDetails.PatientDetails&gt; q = _dbConnection.From&lt;PatientDetails.PatientDetails&gt;();
  q.Join&lt;PatientDetails.PatientDetails, BedDetails.BedDetails&gt;((patient, bed) =&gt; patient.ByBedId == bed.BedDetailsId);
  List&lt;PatientDetails.PatientDetails&gt; PatientBedJOIN = _dbConnection.Select(q);
  
  // Join PatientSession and PatientDetails
  SqlExpression&lt;PatientSession&gt; q1 = _dbConnection.From&lt;PatientSession&gt;();
  q1.Join&lt;PatientSession, PatientDetails.PatientDetails&gt;((session, patientd) =&gt; session.ByPatientId == patientd.PatientDetailsId);
  List&lt;PatientSession&gt; SessionPatientJOIN = _dbConnection.Select(q1);
  </code></pre>
  
  <p>I'm using OrmLite and Sqlite,
  Thanks</p>