var query = (from e in db.Employee select e.EmployeeName) .Concat (from d in db.Department select d.DepartmentName);
.ConcatがUNION ALLに相当する。
var query = (from e in db.Employee select e.EmployeeName) .Union (from d in db.Department select d.DepartmentName);
.Unionが、UNIONに相当する。
複数の項目をUNIONする場合は
var infoQuery = (from cust in db.Customers select new { Name = cust.CompanyName, cust.Phone } ) .Concat (from emp in db.Employees select new { Name = emp.FirstName + " " + emp.LastName, Phone = emp.HomePhone } );