我需要使用NHibernate QueryOver進行查詢。但我在列表中遇到問題。將SQL轉換爲QueryOver()
SELECT * FROM接觸其中CountryId = 'xxx' 的和在ContactTypeId( 'AAA', 'BBB')
的值是的Guid的。我有
我已經試過其中包含GUID對ContactTypeId(contactTypes)的列表() - 但是這是行不通的:
var query = contactRepository.GetAllOver()
.Where(x => x.Country != null && x.Country.Id == countryId)
.WhereRestrictionOn(x => x.ContactType.Id).IsInG(contactTypes);
我希望有人能夠給我一個TIPP如何與QueryOver寫。
如何AndRestrictionOn(P => p.ContactType.Id).IsInG(GuidList)還有什麼是你所得到的錯誤? –
WorldIsRound
2011-04-07 21:20:32