データベース(3.5 SP1)に対して機能する次のLINQクエリを取得しようとしています。
var labelIds = new List<int> { 1, 2 };
var customersAggregatedTransactionsByType =
(from transactions in context.TransactionSet
from customers in context.CustomerSet
.Where(LinqTools.BuildContainsExpression<Billing.Customer, int>(u => u.LabelId, labelIds))
from accounts in context.AccountSet
where customers == accounts.Customer
&& accounts.Id == transactions.Account.Id
&& transactions.DateTime >= fromDate && transactions.DateTime < toDate
group transactions.Amount
by new
{
UserAccountId = transactions.Account.Id,
TransactionTypeId = transactions.TransactionTypeId,
BaseAssetId = accounts.BaseAssetId
} into customerTransactions
select customerTransactions).ToList();
追加するWhere(LinqTools.BuildContainsExpression<Billing.Customer, int>(u => u.LabelId, labelIds))
と、次の例外が発生します。
System.InvalidOperationException:内部.NETFrameworkデータプロバイダーエラー1025。
私がすべてを削除した場合はWhere(LinqTools.BuildContainsExpression<Billing.Customer, int>(u => u.LabelId, labelIds))
良いです。
どんな助けでもありがたいです。
ありがとう、ニール。