After merging 2 LINQ lists, how can I preserve the table objects and names? I thought that it would but it doesn’t seem to be the case.
Here’s how I created my lists:
var USquery = from uscomp in USdb.UScompanies
select new
{
uscomp.equity_cusip,
uscomp.company_name,
uscomp.ticker
}
var CAquery = from cacomp in CAdb.CAcompanies
select new
{
cacomp.equity_cusip,
cacomp.company_name,
cacomp.ticker
}
I merged the lists into:
var mergedList = USquery.Union(CAquery)
Thanks in advance.
They’re not “table objects”, they’re enumerators. To make them into actual lists, use ToList().