public QueryHotKeywordsResult QueryHotKeywords(QueryHotKeywordsParameter param) { var result = new QueryHotKeywordsResult(); var repository = new SearchRepository(); result.Keywords = repository.QueryHotKeywords(param); return(result); }
public string[] QueryHotKeywords(QueryHotKeywordsParameter param) { using (var context = base.CreateContext()) { string componentName = param.ComponentKind.ToString(); var q = from t in context.SearchKeywords where t.ComponentInfo.Name == componentName && t.ComponentInfo.spName != null orderby t.Count descending select t.Keyword; return(q.Take(param.TakeCount).ToArray()); } }