ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

What is LINQ in .Net, and what's the benefit of using it?

user-image
تم إضافة السؤال من قبل Muhammed Effat Ahmed Afifi , Project Leader [Microsoft Business Unit] , Wipro Arabia Limited
تاريخ النشر: 2013/04/16
Mohammed Rizwan Afgani
من قبل Mohammed Rizwan Afgani , Software Engineer, Team Lead , Prosoft e-Solutions (I) Pvt Ltd

LINQ (Language-Integrated Query) is set of extensions to the .Net Framework3.5 and its managed languages that sets the query as an object.
It defines a common syntax and a programming model to query different types of data using a common language.It can be applied to any data-bearing class that inherits from IEnumerable, here T is any data type, for example List.
Advantages:1.
Query against all sources of information, not just relational or XML data.2.
It allows you to query collections like arrays, enumerable classes etc in the native language of your application.3.
Intellisense support, etc.
Hope you find this answer helpful

Anees Mohammed Niamathullah
من قبل Anees Mohammed Niamathullah , .NET Technical Lead , Cognizant Technology Solutions

LINQ is a powerful querying framework which is used in .NET.
It is integrated in the coding language like C#.
It has extension methods which can be used in the query like First(), Single(),ToList() to return data which otherwise can be quite tedious to do in other querying languages, thus it makes retrieval of certain complex query results easier, all the hard work is done by LINQ.
As kashif mentioned it has intellisense support.
Can be used to query data structures, collections.
.NET objects.
It can be used to query against data from DB, Entity Model, LINQ to SQL Data Classes(.dbml) etc.
Hope this answer was useful.

Kashif Akhter
من قبل Kashif Akhter , VP - Wing Head Application Development , National Bank of Pakistan

The Language Integrated Query in .NET Framework 3.5 is a powerful feature to cater the database / provider dependency issues and enables programmers to write source code in single IDE (Visual Studio).
There is no need to learn different query languages for different data sources in presence of LINQ.
Further more LINQ has vast feature set such as Intellisence support, traversal, filter, and projection operations.
Please visit http://msdn.microsoft.com/en-us/library/vstudio/bb397897.aspx for more information.

المزيد من الأسئلة المماثلة