I have been having trouble with some LINQ queries that Telerik can't seem to parse. I have tried several different variations and I have come up with an example that fails every time.
Here is my query:
Running the code above, I get the following failure:
I do not get a failure with these two variants:
Both of these compile and run perfectly.
This is just a very simple breakdown of what I'm actually trying to do (populating complex DTOs), but it demonstrates the problem. Unfortunately, the use of "as" instead of a Cast operation is part of the DTOs I am using, which I do not control. Is there any setting or workaround I could use to allow my first query to run successfully?