join - Can I combine these two Linq queries -


i trying combine sharepoint data legacy database data , can data, need in 2 queries. here 2 linq queries:

 var query =              (from dteai in result.asenumerable()              join allap in dtallairports.asenumerable()               on dteai.field<int>("airportid") equals allap.field<int>("id")                                select new               {                 region = allap.field<string>("region")                                  }                                             ); 

and second gets me result:

var join =             (                 table in query                  group table table["region"] groupedtable                  select new                  {                      key = groupedtable.key,                      count = groupedtable.count()                  }              ); 

not being expert in linq converted sharepoint lists datatables join. can combine single query?

i had make 2 linq methods due fact did not want try method chain , groupby afterwards. of been confusing.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -