ALinq

Linq To Access, MS SQL, SQLite, MySQL, Oracle, Firebird, DB2, PostgreSQL ......

ALinq Document > Programming Guide > Querying the Database > Query Examples

Query Examples

Use the Union operator to return the set union of two sequences.

Example

This example uses Union to return a sequence of all countries in which there are either Customers or Employees.
var infoQuery =
    (from cust in db.Customers
    select cust.Country)
    .Union
        (from emp in db.Employees
        select emp.Country);
Dim infoQuery = _
    (From cust In db.Customers _
    Select cust.Country) _
    .Union _
        (From emp In db.Employees _
        Select emp.Country)