在sql server中,我们可以发出sql来获取数据,如
select * from table where column like '%myword%'
select * from person where Soundex(LastName) = Soundex('Ann')
要匹配上面的 sql 的 linq 查询是什么?
最佳答案
from t in table
where t.column.Contains("myword")
select t
在 .Net 4.0 中你可以使用 SoundCode 函数,大概是这样的:
from p in person
where SqlFunctions.SoundCode(p.LastName) == SqlFunctions.SoundCode('Ann')
select p
关于linq - 像 SQL 的 linq 查询和 sql server 2008 的 Soudex 是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1561664/