日期:2014-05-20 浏览次数:21248 次
string []strArr = new string[]{"ad","d","cdber"};
List<iwms_news> li = new List<iwms_news>();
string[] strArr = new string[] { "中心","铁"};
foreach(string strTemp in strArr)
{
var query = (from news in db.iwms_news
where SqlMethods.Like(news.title, string.Format("%{0}%",strTemp.ToString()))
select news).Skip(0).Take(20).ToList<iwms_news>();
li.AddRange(query.ToList<iwms_news>());
}
foreach (iwms_news q in li)
Console.WriteLine(q.title);
Console.ReadLine();