如何把select [field1] from tab where [field1] like '%string1%'转换成linq
如何把select [field1] from tab where [field1] like '%string1%'转换成linq
日期:2014-05-20 浏览次数:20798 次
怎么把select [field1] from tab where [field1] like '%string1%'转换成linq 怎么把select [field1] from tab where [field1] like '%string1%'转换成linq
------解决方案-------------------- from row in tab where row.field1.Contains("string1") select row.field1
------解决方案-------------------- string.Contains("string")相当于'%string%' string.StartWith("string")相当于'string%' string.EndWith("string")相当于'%string'
------解决方案--------------------