views:

72

answers:

2

I would like to implement this in Linq to SQL:

select * from (
    select * from Orders) as A

Obviously this is a pointless example, but I just can't figure out how to do it!

A: 

Try something like this:

var subquery = from row in Orders select row;
var query = from row in subquery select row;
Jeffrey Hantin
Hi Jeff. Thanks for your response. Yes, I had thought of that. Any ideas on whether it can be combined into one "query"?
Andrew
A: 
using (var dc = new NorthwindDataContext())
{
             var A = from ordOuter in
                 from ordInner in dc.Orders
                 select ordInner
             select ordOuter;
}
Jason w