locked
Question about LINQ to objects and how it works. RRS feed

  • Question

  • I am curious about the purpose of LINQ to objects.

    It seems like it could be extremely useful.  I want to make sure I am on the right track, to understanding  what it's purpose is and how it works. 

    My understanding is that the objects are objects in memory.  These objects can be queried using a query expression, which seems like it would have performance advantages.  This also seems like it could be really powerful because it could reduce post backs to the server. 

    I have a couple questions about LINQ to objects, if it was used for an ASP.NET project.  Would these objects be in memory server side?  Or does this get compiled into javascript that sits client side with the objects cached?

    I am guessing the that these would be server side.

    Am I grasping this aspect of this correctly?  Thanks for any information.
    Wednesday, March 4, 2009 2:16 PM

Answers

  • Yes, you are grasping this correctly. The LINQ framework is an addition to the collection of ddl's that exists as part of the .NET Framework (added in 3.5).

    When your compiled ASP code run in IIS those dlls make calls to the framework to perform the operations you would normally write using loops/iterations, etc. When using LINQ over Objects.

    Keep in mind that LINQ is not just useful in ASP but also in WinForms your output .exe/dlls will also call the framework and the calls from your WinForms project would be no different to ASP when making use of LINQ over Objects.

    If you keep in mind that it is a generic framework to be used in Win/Web applications you can see why it does not take javascript into consideration as it is not specific to ASP Projects as such and more generic.

    Hope this helps you out.

    Thursday, March 5, 2009 5:31 AM

All replies

  • Yes, you are grasping this correctly. The LINQ framework is an addition to the collection of ddl's that exists as part of the .NET Framework (added in 3.5).

    When your compiled ASP code run in IIS those dlls make calls to the framework to perform the operations you would normally write using loops/iterations, etc. When using LINQ over Objects.

    Keep in mind that LINQ is not just useful in ASP but also in WinForms your output .exe/dlls will also call the framework and the calls from your WinForms project would be no different to ASP when making use of LINQ over Objects.

    If you keep in mind that it is a generic framework to be used in Win/Web applications you can see why it does not take javascript into consideration as it is not specific to ASP Projects as such and more generic.

    Hope this helps you out.

    Thursday, March 5, 2009 5:31 AM
  • Thanks for the informative reply.
    Saturday, March 7, 2009 1:59 AM