日期:2014-05-20  浏览次数:20848 次

对于方法 String.Contains,只支持可在客户端上求值的参数。 --这是怎么回事?
代码如下:

var select = from ar in adc.Articles
                             from au in adc.Authors
                             where ar.ShowTime > timeset && ar.AuthorType == typeid && ar.Author.Contains(au.Name) == true && ar.Title.Contains(au.Name) == true
                             orderby ar.ShowTime descending
                             select new
                             {
                                 arid = ar.Id,
                                 ar.Code,
                                 ar.Title,
                                 ar.ShowTime,
                                 auid = au.Id,
                                 au.Name,
                                 au.PinYin,
                                 au.GoUrl
                             };

                foreach (var item in select)
                {
                    AuthorArticle aa = new AuthorArticle();
                    aa.ArticleId = item.arid;
                    aa.ArticleCode = item.Code;
                    aa.ArticleTitle = item.Title;