NHibernate QueryOver を使用して次のクエリを実行する必要があります。しかし、リストに問題があります。
select * from contact where CountryId = 'xxx' and ContactTypeId in ('aaa', 'bbb')
値は Guid のものです。ContactTypeId (contactTypes) の Guid を含む List() があります。
私は試しましたが、これはうまくいきません:
var query = contactRepository.GetAllOver()
.Where(x => x.Country != null && x.Country.Id == countryId)
.WhereRestrictionOn(x => x.ContactType.Id).IsInG(contactTypes);
誰かが QueryOver でこれを書く方法を教えてくれることを願っています。