// var outterResult = null;
using (var ctx = new TIS2APPContext())
{
var results = (
from t in (
from route in ctx.ROUTEs
join rstop in ctx.RSTOPs on route.ROUTEID equals rstop.ROUTEID
join stop in ctx.STOPs on rstop.STOPID equals stop.STOPID
select new { Route = route, RStop = rstop, Stop = stop }
).ToArray()
group new { RStop = t.RStop, Stop = t.Stop } by t.Route into g
select new { Route = g.Key, Stops = g.ToArray() }
).ToArray();
}
Let say I have a complicated LINQ results in a using
scope. Is there a way to get it escape to the outside world? The point is anonymous type, I am not going to create an actual class in this case.
Thanks in advance.