-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();

結果を考慮に入れるために、私は何を置くことができますか= ???? およびid=???

ありがとう

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 に答える