In my application, I received a NotSupportedException when running a LINQ query, and the exception information showed
Membership Access Failed to Compile Expression
As this thread tells me, the output seems to be called by the DateTime variable referenced by the request. Outside of looking for a StackOverflow stream, such as this one, to point you in the right direction, I'm not sure how anyone should figure it out on their own, but for me, changing the way I write the request has fixed the problem.
This syntax threw a "NotSupportedException": *
IEnumerable<Foo> foos = connection.Table<Foo>().Where(foo => foo.Timestamp.Year == year);
Switching to this syntax worked just fine:
IEnumerable<Foo> foos = connection.Table<Foo>().Where( delegate(Foo foo) { return (foo.Timestamp.Year == year); });
source share