Advantages of LINQ?

Rate It (1)

Last post 05-12-2008 12:02 PM by ex glider pilot. 9 replies.

Sort Posts:

  • Advantages of LINQ?

    03-22-2008, 8:55 AM
    May i know what are the main advantages using LINQ over SQL management studio?
    If this post is answer of your question then don't forgot to Click Mark As Answer
    Filed under:
  • Re: Advantages of LINQ?

    03-22-2008, 10:02 AM

    LINQ does not replace Sql Management Studio.  They have nothing to do with eachother.

     

    Regards Mike
    [MVP - ASP/ASP.NET]
  • Re: Advantages of LINQ?

    03-24-2008, 12:22 AM

    Thanks for your answer,

                                    then may i know what are the advantages of LINQ?

    If this post is answer of your question then don't forgot to Click Mark As Answer
  • Re: Advantages of LINQ?

    03-24-2008, 1:59 AM

    It allows you to query collections like arrays, enumerable classes etc in the native language of your application, like VB or C# in much the same way as you would query a database using SQL. LINQ to SQL, which is what most of the current fuss is about, is an Object/Relational Mapper (O/RM) built in to Visual Studio.  It automatically generates entity classes based on the database schema, so it helps speed up development of n-layer arhitecture applications.

     

    Regards Mike
    [MVP - ASP/ASP.NET]
  • Re: Advantages of LINQ?

    03-25-2008, 6:24 AM
    Answer

    Thanks for your answer ,

    Finaly have one more question 

    Is LINQ speed up the database operation compared than sqlclient(Sqlconnection,SqlCommand etc.,) ?

    If yes then tell me the difference in Seconds / Minutes ?

    LINQ is came under Ado.Net or separately ? 

    If this post is answer of your question then don't forgot to Click Mark As Answer
    Filed under:
  • Re: Advantages of LINQ?

    03-25-2008, 10:39 AM

    No it doesn't necessarily speed up operations.  It is part of ADO.NET according to this article: http://msdn2.microsoft.com/en-us/library/bb386944.aspx

     

    Regards Mike
    [MVP - ASP/ASP.NET]
  • Re: Advantages of LINQ?

    03-25-2008, 12:00 PM
    • Loading...
    • bitmask
    • Joined on 07-29-2003, 3:18 PM
    • Citizen of the Earth
    • Posts 1,172

    As Mike said, LINQ to SQL is not nessecarily going to speed up data access code. Since LINQ to SQL is abstraction over the low level ADO.NET command and connection classes, it's bound to be a bit slower at runtime (but hopefully faster to develop with).

    There is more to LINQ than just database work, too. I have an intro article on LINQ here: http://www.odetocode.com/articles/737.aspx

    Hope that helps,

    Scott
    http://www.OdeToCode.com/blogs/scott/
  • Re: Advantages of LINQ?

    03-25-2008, 12:13 PM

    bitmask:
    it's bound to be a bit slower at runtime
     

    Before jeyaseelan asks, it's probably worth pointing out that the difference would be in milliseconds, not seconds or minutes....

     

    Regards Mike
    [MVP - ASP/ASP.NET]
  • Re: Advantages of LINQ?

    04-18-2008, 6:56 AM
    Answer
    • Loading...
    • kmughal
    • Joined on 04-18-2008, 10:45 AM
    • Posts 2

    one reason is might be that extracting data from sql users have to perform lot of operation to organize the data but in LINQ all the operations are supported bec you are writing the database extraction query in the same language.

     

  • Re: Advantages of LINQ?

    05-12-2008, 12:02 PM

    It seems to m that the main advantage of Linq over writing a stored procedure in management studio is the hard typing of tables and parameters and auto completion of column names. The amount of code to connect to the database is significantly reduced - to one or two lines making code much more readable and removing coding errors. A major disadvantage seem to be that in the current release the declarative order of the columns is not maintained int the query output:

    In simple terms if (In SQL Structured Query Language) I declare
    SELECT Zulu, Uniform, Xray FROM MyTable
    The results are in column order Zulu, Uniform, Xray
     
    In simple terms if (In LINQ Language Integrated Query I declare
    FROM MyTable SELECT Zulu, Uniform, Xray
    The results are in column order X, Y , Z
     
    This is (to me) nonsensical. Actually the way around seems to be to not auto generate columns, and cut the aspx - which largely eliminated the advantages of using linq in the first place....   

    Filed under: , ,
Page 1 of 1 (10 items)
Microsoft Communities
Page view counter