linq to entity如何使用like呢?
string[] IntentTemp = { "a", "b", "c", "e" }; string searchTerm = "%,%,%,,%"; var queryTemp = query.Where(qu => qu.FCSure == null || (qu.FCSure != null && SqlFunctions.PatIndex(searchTerm, qu.FCSure) > 0));
参考例子,还是很简单的
_ueditor_page_break_tag_
linq to sql 使用SqlMethods.Like
var q = (from c in db.Customers where SqlMethods.Like(c.CustomerID, "A%O%T") select c).ToList();
参考:1.http://www.cnblogs.com/hantianwei/archive/2011/04/08/2009768.html
2.http://stackoverflow.com/questions/1033007/like-operator-in-entity-framework
3.http://www.bingfengsa.com/old/archives/8799.html
这个解决方案有点看不懂 http://stackoverflow.com/questions/3095781/how-to-use-sql-like-with-linq-to-entities