Je voudrais exécuter une requête LINQ comme ceci:LINQ to SQL - fonction personnalisée
var words = from p in db.Words
where p.Document.Corpus.Name == corpus
//where LevenshteinDistance(p.Text.ToCharArray(), word.ToCharArray()) < threshold
select p;
Mais si je place la fonction "distance de levenshtein" là-bas, il génère une erreur:
NotSupportedException: Method 'Char[] ToCharArray()' has no supported translation to SQL.
Y a-t-il une façon correcte de faire cela?