How does an ORM framework handle joins like what we do in plain SQL?  Is it 
the case that an ORM framework doesn't explicitly join two or more tables?

Suppose I have the following two tables in my database:

Employees
{
    Eid int primary key,
    FirstName varchar(20),
    LastName varchar(20)
}

Committees
{
    Cid int primary key,
    Name varchar(50),  <--- This is the committee name.
    ChairId int references Employees.Eid
}

And I have my POCO classes, EmployeeMap and CommitteeMap defined.

Now how can I use Linq or FluentNHibernate Linq to get something like what 
the following SQL query would give me?

SELECT e.FirstName, e.LastName, c.Name
FROM Employees e 
INNER JOIN Committees c
ON e.Eid = c.ChairId

All FluentNHibernate examples I've seen online query only one table, and 
which is pretty simple and straightforward, but in reality, we rarely query 
only one table.  

Can anyone give me a working example or a pointer to such a thing?  Thank 
you.

-- 
You received this message because you are subscribed to the Google Groups 
"Fluent NHibernate" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/fluent-nhibernate/-/gqPPQqqV7D0J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/fluent-nhibernate?hl=en.

Reply via email to