none
Advantages & Disadvantages of LINQ

    Question

  • What are the advantages of using LINQ and disadvantages of LINQ.
    • Moved by edhickey Monday, August 30, 2010 3:22 PM (From:.NET 3.0/3.5 Windows Workflow Foundation)
    Sunday, August 29, 2010 1:39 PM

Answers

  • John and LitEnders have given good advice.

    To that I will add this

    I'm by no means an sql or a linq expert, I use them both.

    There is a trend to either make linq into something bad or a silver bullet depending on what side are you.

    You need to seriosly consider your project requirements in order to choose.  The choice is not mutually exclusive.  Take what is good from them both .

    If you need anything else do not hesitate to ask, doubt is a sign of intelligence not ignorance.  Remember: "Dubito ergo cogito ergo sum".

    Regards

    Tuesday, August 31, 2010 1:22 PM
  • My List

    Advantages

    • Quick turn around for development
    • Queries can be dynamically
    • Tables are automatically created into class
    • Columns are automatically created into properties
    • Relationship are automatically appeaded to classes
    • Lambda expressions are awesome
    • Data is easy to setup and use

    Disadvantages

    • No clear outline for Tiers
    • No good way of view permissions
    • Small data sets will take longer to build the query than execute
    • There is an overhead for creating queries
    • When queries are moved from sql to application side, joins are very slow
    • DBML concurrency issues
    • Hard to understand advance queries using Expressions

    I found that programmers used to Sql will have a hard time figuring out the tricks with LINQ.  But programmers with Sql knowledge, but haven't done a ton of work with it, will pick up linq quicker. 

    I was writing linq before I took a Sql class in college, linq was alot simplier.  Same with an current intern.  The experienced programmers need to learn a new syntax, that used to be standard.

    Monday, August 30, 2010 7:20 PM
  • In addition to Litenders' comprehensive list, I justified the use of LINQ-to-SQL to my boss based on it's strong data-typing and speed of development for C# programmers who are not really database programmers. It is also very geared towards web-development with its optimistic locking approach: that can save a whack of development effort.

    However I still needed to write some stored procedures for the more complex actions and found locking, serialization and transaction management less than intuitive for the complex code which I chose to write in LINQ. Also there are both pros and cons in terms of performance (see http://social.msdn.microsoft.com/Forums/en-US/linqprojectgeneral/thread/3712aa37-d946-40ed-b72f-8f67a35709de ).

    Finally, though, LINQ does seem to cope with just about anything and the troubles I had were helped along by the good folk of this forum.

    Tuesday, August 31, 2010 7:54 AM

All replies

  • My List

    Advantages

    • Quick turn around for development
    • Queries can be dynamically
    • Tables are automatically created into class
    • Columns are automatically created into properties
    • Relationship are automatically appeaded to classes
    • Lambda expressions are awesome
    • Data is easy to setup and use

    Disadvantages

    • No clear outline for Tiers
    • No good way of view permissions
    • Small data sets will take longer to build the query than execute
    • There is an overhead for creating queries
    • When queries are moved from sql to application side, joins are very slow
    • DBML concurrency issues
    • Hard to understand advance queries using Expressions

    I found that programmers used to Sql will have a hard time figuring out the tricks with LINQ.  But programmers with Sql knowledge, but haven't done a ton of work with it, will pick up linq quicker. 

    I was writing linq before I took a Sql class in college, linq was alot simplier.  Same with an current intern.  The experienced programmers need to learn a new syntax, that used to be standard.

    Monday, August 30, 2010 7:20 PM
  • In addition to Litenders' comprehensive list, I justified the use of LINQ-to-SQL to my boss based on it's strong data-typing and speed of development for C# programmers who are not really database programmers. It is also very geared towards web-development with its optimistic locking approach: that can save a whack of development effort.

    However I still needed to write some stored procedures for the more complex actions and found locking, serialization and transaction management less than intuitive for the complex code which I chose to write in LINQ. Also there are both pros and cons in terms of performance (see http://social.msdn.microsoft.com/Forums/en-US/linqprojectgeneral/thread/3712aa37-d946-40ed-b72f-8f67a35709de ).

    Finally, though, LINQ does seem to cope with just about anything and the troubles I had were helped along by the good folk of this forum.

    Tuesday, August 31, 2010 7:54 AM
  • John and LitEnders have given good advice.

    To that I will add this

    I'm by no means an sql or a linq expert, I use them both.

    There is a trend to either make linq into something bad or a silver bullet depending on what side are you.

    You need to seriosly consider your project requirements in order to choose.  The choice is not mutually exclusive.  Take what is good from them both .

    If you need anything else do not hesitate to ask, doubt is a sign of intelligence not ignorance.  Remember: "Dubito ergo cogito ergo sum".

    Regards

    Tuesday, August 31, 2010 1:22 PM
  • You need to seriosly consider your project requirements in order to choose.  The choice is not mutually exclusive.  Take what is good from them both .
    Sage advice, Serguey!
    Tuesday, August 31, 2010 1:35 PM
  • Is there something your Comparing it to?  Such as ADO.Net or MySql & Java.
    Tuesday, August 31, 2010 1:43 PM