我想将以下查询写入NHibernate-Query以获取PRESC.ADMINDATE排序的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
如何进行加入?
答案 0 :(得分:0)
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();