Compiler Error CS1946
Visual Studio 2012
An anonymous method expression cannot be converted to an expression tree.
An anonymous method represents a set of statements but an expression tree must not contain a statement. Therefore an anonymous method cannot be represented by an expression tree.
To correct this error
-
Change the anonymous method to a lambda expression.