The thing I don't like about ORMs as they are typically handled is that you map objects to tables up front, and those are the things you can query for.
Using something like Linq, you can more easily treat your database as relational, and still return strongly typed objects. These objects can be the thing you wanted to return from the query, which is not necessarily mapped directly to the entities in the database.
I like this approach more, since you still get one of the main advantages of a relational database: you can get the data in the shape you want, not in the shape it's stored.
For example:
var query = from c in customers
join o in orders on c.ID equals o.ID
select new {
c.Name,
o.Product,
Address = c.MailingAddress
};
Of course, anonymous objects in C# can be a pain in the ass, since you can't usefully return them from a method. Something like Scala's structural types would solve that problem.I don't really like C# that much as a language, but I do like the Linq approach.
An example from OCaml:
type person = { first_name: string; last_name: string; age: int }
In a language that has some form of anonymous records (like C#'s anonymous object) and structural typing, this would let you work with relations in your language, much in the way you'd use them in SQL.
I personally like treating data as data. It should be immutable, and therefore there is no state to hide, which means there isn't much value in your types being objects.
It also allows for nice things like pattern matching to work with your data.
If you build a database view, you can often trick an ORM into thinking its a table.