How to limit a LINQ left outer join to one row

后端 未结 4 737
南方客
南方客 2020-12-13 12:53

I have a left outer join (below) returning results as expected. I need to limit the results from the \'right\' table to the \'first\' hit. Can I do that somehow? Currently,

4条回答
  •  鱼传尺愫
    2020-12-13 13:45

    You could do something like:

    var q = from c in
              (from s in args
               select s).First()
            select c;
    

    Around the last part of the query. Not sure if it will work or what kind of wack SQL it will produce :)

提交回复
热议问题