Advantages of LINQ

I need to create a proposal why one should use LINQ.

What are the pros and cons?
mathieu_cuprykAsked:
Who is Participating?
 
Éric MoreauConnect With a Mentor Senior .Net ConsultantCommented:
Linq-to-What???

I wouldn't live now without LINQ-to-Objects. Try to filter, sort, select only a few fields of a collection and now join that to another source. All this in a single query!

But that alone hardly justifies the fact of moving to the .Net Framework 3.5.

LINQ-to-XML is another of my favorite.

I don't see why one shouldn't use LINQ. It is built-in to the language.
0
 
mathieu_cuprykAuthor Commented:
ok this is what I thought.

Do you know where I can get a code generator for classes I read a table from the database and create the corresponding class.
0
 
Sreedhar VengalaConnect With a Mentor Sr. Consultant - Business IntelligenceCommented:
Look at this : http://www.aspfree.com/c/a/.NET/Introducing-LINQ-to-SQL-Designer-using-Visual-Studio-2008/
Also to learn Linq: Linqpad is the best tool (do bit of google on it)
0
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

 
Éric MoreauSenior .Net ConsultantCommented:
>>Do you know where I can get a code generator for classes I read a table from the database and create the corresponding class.

I don't know how it is related to the question but Entity Framework is doing that. There is also CodeSmith doing that.
0
 
Sreedhar VengalaSr. Consultant - Business IntelligenceCommented:
SqlMetal is a command line generator that builds the OR types used by LINQ to SQL. It reverse engineers a given database.
http://www.hookedonlinq.com/SqlMetal.ashx
http://msdn.microsoft.com/en-us/library/bb399400.aspx

0
 
mathieu_cuprykAuthor Commented:
hi sree not with link if possible. done in asp.net would be cool.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.