0
嘗試將查詢結果投影到整數列表中。如何做到這一點?應該使用什麼變壓器。 AliasToBean無法正常工作,因爲它需要setter。NHibernate預測:如何將QueryOver投影到int列表中?
var accessFeeYears = _session.QueryOver<AgreementAccessFee>()
.JoinAlias(a => a.FeeType,() => agreementAccessFeeTypeAlias)
.Where(x => x.Agreement.Id == request.AgreementId
&& agreementAccessFeeTypeAlias.Code ==AgreementAccessFeeTypeCode.FlatChargePerInsured)
.SelectList(list => list
.Select(a => a.PolicyYear).WithAlias(() =>policyYear))
.TransformUsing(Transformers.??????)
.List<int>();