I would like to run a LINQ query like this:
var words = from p in db.Words
where p.Document.Corpus.Name == corpus
//where LevenshteinDistance(p.Text.ToCharArray(), word.ToCharArray()) < threshold
select p;
But if I place the "LevenshteinDistance" function in there it will generate an error:
NotSupportedException: Method 'Char[] ToCharArray()' has no supported translation to SQL.
Is there a correct way to do this?