Where句に4つの引数を指定してLINQクエリを作成しようとしています。これはWindows8アプリプロジェクトであり、SQLiteデータベースを使用しています。(SQLiteの実装)
コードスニペットは次のとおりです。
public List<FinancialListBoxExpenseItem> retrieveExpenseItems(int month, int year, bool isPaid, StaticResources.FrequencyEnum frequencyEnum)
{
List<FinancialListBoxExpenseItem> tmpList = null;
connection.RunInTransaction(() =>
{
var items = from s in connection.Table<FinancialListBoxExpenseItem>()
where (s.expenseDateNextPayment.Month == month)
&& (s.expenseDateNextPayment.Year == year)
&& (s.expensePaidForCurrentPeriod == isPaid)
&& (s.expenseFrequencyTypeEnum == frequencyEnum)
select s;
tmpList = items.ToList<FinancialListBoxExpenseItem>();
});
return tmpList;
}
NotSupportedActionをスローします:メンバーアクセスは式のコンパイルに失敗しました例外
これが何を意味し、どのように修正するのかわかりません。
編集:where句がなくても機能するため、エラーはコードのこのwhere句の部分に関連している必要があります