The fastest way to learn Linq for entities

I am developing my first ASP.NET MVC application using the Entity Framework. I have no experience with .NET, although I am fluent in other OO languages. I'm having trouble understanding Linq to Entity expressions, or rather its syntax and rendering the results on an ASP page.

For example, I join three tables (entities) together and try to iterate over the results, but I get all kinds of errors like. Every example I find on Google, SO, or MSFT has not been simple, and every site uses its own approach. I looked at the book "Programming the Essential Structure", but it also seems to be on my head now.

I am looking for clear, concise examples of performing equivalent complex multiple joins and iterating over results.

thanks

+4
source share
3 answers

I just started it myself, and I bought both the wrox book and o'reilly one.

I found wrox one a little more inaccessible - the language used in it is a little heavier, and the layout / organization is not quite so "streaming" (this word is "hehe").

On the other hand, on the other hand, it is a crack read, and it really leads it well. It is also available on safari, if you have a sub, I received it from Amazon, which seemed to be one of the few places where it was in stock. Highly recommended.

+3
source

take a look at these samples - http://blogs.msdn.com/adonet/archive/2007/03/13/101-linq-samples-updated.aspx

I took the concept from these examples themselves

Scott Guthrie's blog is also a really good explanation and samples

+1
source

It sounds as if you should get a good book on this. Since you have no previous experience with .NET, the general book that covers LINQ may be the beginning and then specific to ASP.NET-MVC.

Perhaps the reason that fluency in β€œother” OO languages ​​does not help is because LINQ is not an OO language, it is much more functional and therefore uses a different way of reasoning to understand well.

0
source

All Articles