San

San

  • NA
  • 804
  • 327k

Linq Union join multiple tables and select multiple columns.

Oct 31 2019 8:26 AM
Below query facing issue selecting multiple columns.
 
var relSite = (from d in _context.Account
join c in _context.AccountRel on d.ID equals c.RelID
join s in _context.AccountType on c.PrelID equals s.ATypeID
where c.ARelID == accountid && s.Type == "Test"
select a.ID)
.Union
var relSite = (from d in _context.Account
join c in _context.AccountRel on d.ID equals c.RelID
join s in _context.AccountType on c.PrelID equals s.ATypeID
where c.ARelID == accountid && s.Type == "Test"
select a.ID)
 

Answers (2)