title: NHibernate left join with linq
body: <p>I need to change join in linq which is using NHibernate into left outer join.
  My code look like this </p>
  
  <pre><code>IQueryable&lt;DimServicePoint&gt; spq =
                              from sp in session.Query&lt;DimServicePoint&gt;()
                              join spm in session.Query&lt;DimServicepointMeter&gt;() on sp.ServicePointKey equals spm.ServicePointKey into gj
                              from subsp in gj.DefaultIfEmpty()
                              where (sp.ServicePointID == servicePointID &amp;&amp; sp.DimAccount.AccountKey != 0 &amp;&amp; sp.StartDayID &lt;= currentDateId &amp;&amp; sp.EndDayID &gt;= currentDateId)
                              select sp;
  </code></pre>
  
  <p>Now my requirement is join DimServicepointMeter with left join in this query.
  Equivalent SQL query is :</p>
  
  <pre><code>select * from dw.dim_servicepoint sp
  left join dw.dim_servicepoint_meter spm on sp.servicepointkey = spm.servicepointkey
  where sp.servicepointid = @ServicePointID  and sp.accountkey != 0
  and sp.startdayid &lt;= @currentDateId  and sp.enddayid &gt;= @currentDateId 
  </code></pre>
  
  <p>I have not work much in NHibenate or linq so don't have much idea how to do left join in NHibernate or linq.
  Any help is appreciated</p>