我必須使用此查詢獲取前20行,而類似子句不起作用。任何人都可以告訴我爲什麼/幫我找到解決方案?實體框架中的查詢
var zipcodes = (from results in db1.ZipCodes1
where results.CityType == "D" && results.ZIPCode like '%ZC %'
select new Ajaxresults
{
ZIPCode= results.ZIPCode,
CityName = results.CityName,
StateAbbr = results.StateAbbr,
StateName = results.StateName
}).GroupBy(o => o.ZIPCode);
使用'results.ZIPCode.Contains( 「ZC」)'代替喜歡。 – aligray 2011-05-27 05:15:09
我必須在上述查詢中選擇前20行 – iProgrammer 2011-05-27 05:18:42
@aligray將您的答案放在'您的答案'框中,而不是作爲註釋。 – 2011-05-27 05:19:55