------解决方案--------------------
%表示零长度或任意长度的字符串;_表示一个字符串;[]表示在某范围区间的一个字符; [^]表示不再某范围区间的一个字符。 你的LINQ的写法是 var q = from c in db.Customers where SqlMethods.Like(c.CustomerID,"32%") select c;
------解决方案--------------------
C# code
var query = from c in LQDC.Customers
where SqlMethods.Like(c.City, "32%")
select c;
------解决方案--------------------
------解决方案--------------------
C# code
where c.CustomerID.EndWith("32") //like '32%'
where c.CustomerID.StartWith("32") //like '%32'
where c.CustomerID.Contains("32") //like '%32%'
------解决方案--------------------