I'm trying to run a custom method in subsonic query. Here is my query:
Page = Pages.SingleOrDefault(o=>Misc.MakeURL(o.Title) == URL);
and I'm getting this error:
The method 'MakeURL' is not supported
I'm using Subsonic 3. Any ideas would be great, thanks.
This is simply not possible,
subsonic translates your expression to SQL, so
will propably generate a similar query like this
and you are expecting subsonic to convert your MakeUrl(...) method into SQL. What do you expect?
However, you can either just query the title or call ToList() on your pages, but that will pull all records from the database.