-1

我想加入表中的结果,以总结 2 个不同行的 where 条件的结果,如下代码:

        var a = (from o in _DB.Services
                where (o.description.Contains(searchText) || o.nom.Contains(searchText))
                orderby o.date
                select new { results = ?????, id = ?????? }).Take(maxResults).ToList();

我可以放什么,以考虑到结果=???? 和身份证=???

谢谢

4

1 回答 1

0

根据您的评论,您不能只执行以下操作吗?

var a = (from o in _DB.Services
            where (o.description.Contains(searchText) || o.nom.Contains(searchText))
            orderby o.date
            select new  
                   { 
                       results = o.description,
                       id = o.nom
                   })
            .Take(maxResults)
            .ToList();
于 2012-05-02T08:43:52.693 回答