Hi,
I wanted to use a method I created inside a query coz i need to implement a peculiar type of filter...
return manager.Clients.SelectAll().Where(cli => cli.Name.SatisfyFilter(filter.Name) && cli.LastName.SatisfyFilter(filter.LastName) && cli.MiddleName.SatisfyFilter(filter.MiddleName)).ToList();
But i get the:
"Method 'Boolean SatisfyFilter(System.String, System.String)' has no supported translation to SQL."
Error
My method is:
public static bool SatisfyFilter(this string palavra, string filtro)
same thing as the
public bool Contains(string value)
in the string type, and Contains works just fine...
I need this method to run on the IQueryable, coz my table has 25 million clients...
I saw on the sql profiler that the Contains is transformed in sql...
How do i implement my method to send the correlative filter code to the sql? =/