Hi Carl,
You should write it this way:
Code:
<cf:method name="Search" body="Search(string email, string userName) where EMail like ('%%' + @email + '%%') and UserName like ('%%' + @userName + '%%') " />
Note the % character needs to be doubled, otherwise the parser will treat %' + @userName + '% as the reference to an environment variable named
' + @userName + ' (this is a common behavior for all Xml attributes in CodeFluent Entities models). Since there is no environment variable with that name (!) it would then be replaced by an empty string, and the resulting CFQL body would then be:
Code:
<cf:method name="Search" body="Search(string email, string userName) where EMail like ('') and UserName like ('') " />
which is correct but of course does not work as expected :)
Thanks!
CodeFluent Support Team