This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi, I have some problems trying to change my queries in compiled queries. First I wanted to check if string parameter is empty and I always got error. My linq looked like this:
Then I changed it to (so I only passed the result of checking if filterValue was empty):
And at least the error disappeared but I got a problem: Every time when filterValue parameter was not empty (so CompiledQuery.Parameter Cause the whole query worked fine before I used compiled query and CompiledQuery.Parameter... I'll be grateful for your help and some explanation. Best regards, Lukasz |
|
|
Yes, unfortunately this is not supported as we need to escape and add the surrounding wildcards which is not something we can handle within the compiled query framework. I will add a check for this to provide a better message which would be triggered on the .Compile() call to alert you to the issue.
|
|