NHibernate Criteria: Unterabfrage nach 'From'-Klausel
Wie kann ich mit Criteria folgendes SQL schreiben:
select b.Name as Batch, b.Capacity as Capecity,
a.tStudent as Admit, (b.Capacity-a.tStudent) as Availabe
from (
SELECT count(Id) as tStudent, BatchId FROM [dbo].[Student] group by BatchId) as a
left join [dbo].[Batch] as b on a.BatchId = b.Id