What is the use of LINQ?

Posted by Iluvdotnetfunda under ASP.NET on 3/2/2012 | Points: 10 | Views : 40234 | Status : [Member] | Replies : 9
Hi Friends,

Great Day.

What is the use of LINQ, and can i have a simple example.

Thanks&Regards

Iluvdotnetfunda.




Responses

Posted by: Ravyii on: 3/2/2012 [Member] Starter | Points: 25

Up
0
Down
LINQ is a new feature available from .net version 3.0 and above. It called as LANQUAGE INTEGRATED QUERY there are different flavours of LINQ available like LINQ TO SQL, LINQ TO XML etc.. Taking advantage of LINQ you can query the collection as if you are querying from a database.

Basic example
var users = from userVariable in studentCollection
select userVariable.ID;

ravyii

Iluvdotnetfunda, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sksamantaray on: 3/2/2012 [Member] Silver | Points: 25

Up
0
Down
Hi,
go through these link, which might help you.
http://msdn.microsoft.com/en-us/library/bb907622.aspx
http://weblogs.asp.net/scottgu/archive/2006/05/14/Using-LINQ-with-ASP.NET-_2800_Part-1_2900_.aspx

Thanks,
Sanjay

Iluvdotnetfunda, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Hmanjarawala on: 3/2/2012 [Member] Bronze | Points: 25

Up
0
Down
Hi refer this

http://www.eggheadcafe.com/community/linq/63/10285587/what-is-the-use-of-linq.aspx
http://stackoverflow.com/questions/779146/what-are-some-clever-uses-of-linq

Himanshu Manjarawala
Sr. Software Engineer@AutomationAnywhere
http://fieredotnet.wordpress.com/

Iluvdotnetfunda, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Iluvdotnetfunda on: 3/2/2012 [Member] Starter | Points: 25

Up
0
Down
Hi Ravyii,

Can you provide me detailed explanation for that example.

Thanks&Regards
iluvdotnetfunda

Iluvdotnetfunda, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Iluvdotnetfunda on: 3/2/2012 [Member] Starter | Points: 25

Up
0
Down
Hi,

Thanks for your help.
i got a better idea from this information.

Thanks&Regards
iluvdotnetfunda

Iluvdotnetfunda, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Naraayanan on: 3/5/2012 [Member] Starter | Points: 25

Up
0
Down
Hi,
Check this link
http://msdn.microsoft.com/en-us/library/bb308959.aspx

Regards,
Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/
http://abaprocker.blogspot.com/

Iluvdotnetfunda, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sunita on: 2/7/2013 [Member] Starter | Points: 25

Up
0
Down
Hi refer this

This link provide the 101 LINQ Samples which help u,

http://code.msdn.microsoft.com/101-LINQ-Samples-3fb9811b
http://www.dotnetperls.com/linq
http://www.codeproject.com/Questions/500506/whatplusisplusLINQcomputing-3f

Iluvdotnetfunda, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Kundan64 on: 2/7/2013 [Member] Starter | Points: 25

Up
0
Down
Hi Iluvdotnetfunda,
Pls go through the above link: http://www.linqpad.net/WhyLINQBeatsSQL.aspx
It will help you.


Mark as answer if its help you.

Iluvdotnetfunda, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rameshrajendran on: 2/7/2013 [Member] Starter | Points: 25

Up
0
Down


hai

look and refer below link
http://www.dotnetcurry.com/ShowArticle.aspx?ID=727

And here we take a simple example of LINQ. We just compare a number with a number of digits:

int[] digits = { 5, 4, 1, 7, 9, 8, 6, 7, 4, 5 };

var num =
from n in digits
where n >= 6
select n;


Console.WriteLine("Numbers < 5:");

foreach (var x in num)
{
Response.Write(x);

}

You like,Please answer me
Have a happy coding.
http://dotnet--solutions.blogspot.in

Iluvdotnetfunda, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response