Is there any chance to run c# method in linq query? I need to do something like that:
//...
class Match {
public double PrecentageMatching(string s1, string s2) {
//...
return result; // value from 0.0 to 1.0
}
}
//...
string pattern = "nameOfRecord";
var similarRecords = db.Table.Select(
r => Match.PrecentageMatching(r.name, pattern) > 0.5
);
我知道,林克胜地知道有预选材料的方法。 但我不禁要问,有没有办法这样做?
I m using Entity framework. I need to do it without stored procedures and assembly on database side. I dont have access to database.