4
Answers

Advantage of Linq?

Suman Pal

Suman Pal

8y
429
1
Advantage of Linq ? why we use it
Answers (4)
0
Soumalya Das

Soumalya Das

NA 1.2k 50.3k 8y

Benefits of LINQ

  • Because LINQ is integrated into the C# language, it provides syntax highlighting and IntelliSense. These features make it easy to write accurate queries and to discover mistakes at design time.
  • Because LINQ queries are integrated into the C# language, it is possible for you to write code much faster than if you were writing oldstyle queries. In some cases, developers have seen their development time cut in half.
  • The integration of queries into the C# language also makes it easy for you to step through your queries with the integrated debugger.
  • The hierarchical feature of LINQ allows you to easily see the relationship between tables, thereby making it easy to quickly compose queries that join multiple tables.
  • The unitive foundation of LINQ allows you to use a single LINQ syntax when querying multiple data sources. This allows you to get up to speed on new technologies much more quickly. If you know how to use LINQ to Objects, it is not hard to learn how to use LINQ to SQL, and it is relatively easy to master LINQ to XML.
  • Because LINQ is extensible, you can use your knowledge of LINQ to make new types of data sources queriable.
  • After creating or discovering a new LINQ provider, you can leverage your knowledge of LINQ to quickly understand how to write queries against these new data sources.
  • Because LINQ is composable, you can easily join multiple data sources in a single query, or in a series of related queries.
  • The composable feature of LINQ also makes it easy to break complex problems into a series of short, comprehensible queries that are easy to debug.
  • The transformational features of LINQ make it easy to convert data of one type into a second type. For instance, you can easily transform SQL data into XML data using LINQ.
  • Because LINQ is declarative, it usually allows you to write concise code that is easy to understand and maintain.
  • The compiler and provider translate declarative code into the code that is actually executed. As a rule, LINQ knows more than the average developer about how to write highly optimized, efficient code. For instance, the provider might optimize or reduce nested queries.
  • LINQ is a transparent process, not a black box. If you are concerned about how a particular query executes, you usually have a way to examine what is taking place and to introduce optimizations into your query.

and follow this link

https://social.msdn.microsoft.com/Forums/en-US/cd952b8e-4bc6-4be9-87d3-cec7fbe7a0d8/advantages-disadvantages-of-linq?forum=linqtosql
Accepted
0
Rajeesh Menoth

Rajeesh Menoth

NA 24.7k 629.5k 8y
Hi,
 
Advantages
 
1. Quick turn around for development
2. Queries can be dynamically
3. Tables are automatically created into class
4. Columns are automatically created into properties
5. Relationship are automatically appeaded to classes
6. Lambda expressions are awesome
7. Data is easy to setup and use
8. It is a cleaner and typesafety.
9. LINQ is part of .NET, we can use the visual studio's debugger to debug the queries.
10. It is more concise and readable, especially when filtering multiple conditions.
11. They provide powerful filtering, ordering, and grouping capabilities with a minimum of application code.
 
Reference :
 
https://social.msdn.microsoft.com/Forums/en-US/cd952b8e-4bc6-4be9-87d3-cec7fbe7a0d8/advantages-disadvantages-of-linq?forum=linqtosql
 
http://www.dotnetspider.com/forum/323806-linq-Advantages-disadvantages.aspx
0
Midhun T P

Midhun T P

NA 19.7k 281.1k 8y
LINQ is used for querying data.
LINQ can be used to query many different types of data including SQL, XML, objects etc.
Please check below links for more detailed explanations and advantages.
http://www.careerride.com/LINQ-defined.aspx
http://www.c-sharpcorner.com/UploadFile/c5c6e2/using-linq-in-net/
0
Bhuvan Pandey

Bhuvan Pandey

NA 826 73.1k 8y

Language Integrated Query:

LINQis standard andeasily-learned patterns for querying and updating data which support any kind of data store. As:

LINQ to Object
LINQ to SQL
LINQ to XML
LINQ to Entity Framework
No need to learn different syntax to work with different type of data.