.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Articles >> LINQ >> Post New Resource Bookmark and Share   

 Subscribe to Articles

Language-Integrated Query

Posted By:Lakhan Pal Garg       Posted Date: May 24, 2010    Points: 25    Category: LINQ    URL: http://www.dotnetspark.com  

LINQ Stands for Language-Integrated Query. LINQ has a great power of querying on any source of data, data source could be the collections of objects, database or XML files.
 

Introduction
LINQ Stands for Language-Integrated Query. LINQ has a great power of querying on any source of data, data source could be the collections of objects, database or XML files. We can easily retrieve data from any object that implements the IEnumerable interface. Microsoft basically divides LINQ into three areas and that are give below:

  • LINQ to Object {Queries performed against the in-memory data}
  • LINQ to ADO.Net
    • LINQ to SQL (formerly DLinq) {Queries performed against the relation database only Microsoft SQL Server Supported}
    • LINQ to DataSet {Supports queries by using ADO.NET data sets and data tables}
    • LINQ to Entities {Microsoft ORM solution}
  • LINQ to XML (formerly XLinq) { Queries performed against the XML source}
Example:

int[] nums = new int[] {0,1,2,3,4,5};
var res = from a in nums
where a < 3
orderby a
select a;
foreach(int i in res)
Console.WriteLine(i);
Output:
0
1
2
3
4
5

Thanks & Regards

Lakhan Pal Garg

 Subscribe to Articles

     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend