この Linq クエリを実行すると、「NotSupportedException」が発生します。「指定された方法はサポートされていません。」どのような方法ですか?「Count()」をコメントアウトしてもエラーは同じです。Null 内部例外。
スタックトレース:
Hydra.WPF.ViewModels.AddressListViewModel._primaryMemberListWorker_DoWork (オブジェクト送信者、DoWorkEventArgs e) で M:\Projects\Hydra\WPF\ViewModels\AddressList\AddressListViewModel.cs: 行 1377 で System.ComponentModel.BackgroundWorker.WorkerThreadStart (オブジェクト引数)
SQL クエリ:
Select * From _Members
Inner Join AddressDetailsCCN a on a.MemberId=_Members.MemberID
Inner Join
(
Select Address+Address2 as CombinedAddress
From AddressDetailsCCN Where ListId=84
group by Address+Address2
Having COUNT(*)>1
) B on B.CombinedAddress=A.Address+A.Address2
Where CombinedAddress is not null AND CombinedAddress!='' AND a.ListId=84
Order by ClientID, CombinedAddress
リンク:
var grouped =
(from mem in session.Query<Member>()
join detail in session.Query<Detail>() on mem.Id equals detail.Member.Id
join d2 in (from d3 in session.Query<Detail>()
where d3.AddressList.Id == criteria.AddressList.Id
group d3 by d3.Address + d3.Address2 into x
where x.Count() > 1
select x) on detail.Address+detail.Address2 equals d2.Key
where detail.AddressList.Id==criteria.AddressList.Id
select mem);