Joining tables NHibernate

本文关键字:NHibernate tables Joining | 更新日期: 2023-09-27 18:25:16

我想向NHibernate query编写以下查询,以便获得PRESC.ADMINATE 订购的PRESC_DEL列表

select * from PRESC_DEL, PRESC 
     where PRESC.ID = PRESC_DEL.ID_PRESC 
     and PRESC_DEL = PRESC_DEL.ID_DISTRIBUTIE
     or by PRESC.ADMINDATE

我该如何加入?

Joining tables NHibernate

var query = (from pd in session.Query<PrescDel>()
             where pd.??? = pd.IdDistribute
             orderby pd.AdminDate
             select pd);
var results = query.Fetch(x => x.Presc).ToList();