LINQ book

M

Marc Gravell

Well, LINQ in Action is certainly good for LINQ to SQL. I haven't read
the other. It depends what you are interested in really: LINQ is more
a philosohpy/pattern than a specific technology. For example, you can
get LINQ to Amazon, LINQ to ADO.NET Data Services, etc. In terms of
the *language* - i.e. *how* everything works together, I know that "C#
in Depth" gives a good account (the latter third-or-so) - so if you
want to know *how* all these different implementations work it might
be worth a read.

Marc
 
T

Tim Jarvis

Peter said:
Hi all

I would like to learn LINQ in great depth, not just "usual" use but
how to do just about everything :) So far I have found the
following two books, the first looks most interesting:

http://tinyurl.com/6po5bl

http://tinyurl.com/5cw6ar

Any opinions on these? Any recommendations for other books?


Thanks

Pete

Hi Pete,

I havent read either of those, but I can offer some advice.

From what I can see most of the books simply concentrate on explaining
the IEnumerable<T> extension methods pertaining to Linq, if you are
lucky they will give some syntax examples of the (syntactical sugar)
linq expressions. All of this you will pick up real easily and without
hassle, its an order of magintude easier than OCL ;-)

The real depth of Linq comes into exploring the differences between
IEnumerable<T> extension methods (Func<T1,T2> and IQueryable<T> methods
(Expression<Func<T1,T2>>), and the ability for Lambda extressions to
resolve to either anonymous methods *or* expression trees. If I had my
time over again I would look for that topic in any book I bought on
Linq.

Regards Tim.

--
 
J

Jon Skeet [C# MVP]

Tim Jarvis said:
I havent read either of those, but I can offer some advice.

From what I can see most of the books simply concentrate on explaining
the IEnumerable<T> extension methods pertaining to Linq, if you are
lucky they will give some syntax examples of the (syntactical sugar)
linq expressions. All of this you will pick up real easily and without
hassle, its an order of magintude easier than OCL ;-)

The real depth of Linq comes into exploring the differences between
IEnumerable<T> extension methods (Func<T1,T2> and IQueryable<T> methods
(Expression<Func<T1,T2>>), and the ability for Lambda extressions to
resolve to either anonymous methods *or* expression trees. If I had my
time over again I would look for that topic in any book I bought on
Linq.

What would you want to see about the differences between the
IEnumerable<T> methosd and the IQueryable<T> methods though? From a
language point of view they're just different methods which may end up
getting called as part of query expression translation. I agree that
it's important to understand that, and that lambda expressions can be
converted into either delegates or expression trees - but at an
individual method level, what are you after?

When it comes to what IQueryable<T> methods can be used for *exactly*
(i.e. how to produce a left outer join in the generated SQL etc) I'd
want to see a different reference for each provider, as that really
will vary.
 
T

Tim Jarvis

Jon said:
What would you want to see about the differences between the
IEnumerable<T> methosd and the IQueryable<T> methods though? From a
language point of view they're just different methods which may end
up getting called as part of query expression translation. I agree
that it's important to understand that, and that lambda expressions
can be converted into either delegates or expression trees - but at
an individual method level, what are you after?

When it comes to what IQueryable<T> methods can be used for exactly
(i.e. how to produce a left outer join in the generated SQL etc) I'd
want to see a different reference for each provider, as that really
will vary.

Hi Jon,

Oh it helps that I know Peter from his (and mine) Delphi and
specifically ECO days. I know that Peter will want to understand in
depth what is happening under the covers. I am certain that he will
want to know the exact circumstances that an Expression tree is being
used and how they are constructed. Peter is the sort of guy who would /
could build Linq providers (in fact thats what I hope he is doing for
ECO ;-).

My response was just to indicate that most of the books I have seen (so
far) don't really talk about it in depth, they cover it from a
syntactical usage point of view.

Regards Tim.

--
 
M

Michel Walsh

The second book give details I haven't seen anywhere else, in a book, as
example, what would be your C# statement to get the following generated SQL:

SELECT [t0].[a],
[t0].,
dbo.SomeUserDefinedFunction([t].[a], [t0].)
FROM someTableName AS [t0]


Unfortunately, I have the book, but haven't read it as I would like ... we
decided to not use LINQ just at the time it was on my schedule to read it
from cover to cover! But sounds like a must if you plan serious work.


I got time to read the first one you mentioned, and enjoyed it. I
particularly liked its coverage of LINQ-Join, which, for me, was the book
with the better coverage of this LINQ-concept. I also got the LINQ way of
thinking, which is not the SQL way at all, but sometimes, both converge!


Vanderghast, Access MVP
 
M

Michel Walsh

update: the first reference also mentions how to use udf, so I was incorrect
in my example.


Michel Walsh said:
The second book give details I haven't seen anywhere else, in a book, as
example, what would be your C# statement to get the following generated
SQL:

SELECT [t0].[a],
[t0].,
dbo.SomeUserDefinedFunction([t].[a], [t0].)
FROM someTableName AS [t0]

(...)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top