What is linq query for SQL and Soudex for SQL Server 2008?

In sql server we can issue sql to get data like

select * from table where column like '%myword%'
select * from person where Soundex(LastName) =  Soundex('Ann')

which linq query will match above sql?

+3
source share
2 answers
from t in table
where t.column.Contains("myword")
select t

In .Net 4.0, you can use the SoundCode function, perhaps like this:

from p in person
where SqlFunctions.SoundCode(p.LastName) == SqlFunctions.SoundCode('Ann')
select p
+2
source

Source: https://habr.com/ru/post/1720006/


All Articles