例えば:-
// This one will be converted to SQL no problem
Expression<Func<Foo, bool>> predicate = x => x.Name = "Foo";
// This one will throw a NotSupportedException because the QueryProvider
// doesn't support reference comparisons
Expression<Func<Foo, bool>> predicate = x => x == someOtherFoo;
// This one doesn't work because the query provider can't
// handle IsAwesome()
Expression<Func<Foo, bool>> predicate = x => x.IsAwesome();
理想的には、データベースから分離された自動テストで、実行前にこれをテストする方法を探しています。
私は自分の QueryProvider をインスタンス化する方法を見つけるために MSDN をトロールするのに時間を費やしましたが、私の Google-fu は今日私を失敗させているようです.
前もって感謝します!