# Visual Basic > Slow Chat with the Microsoft Visual Basic team >  Question on LINQ

## timeshifter

I've been curious about this from the first time I saw it, but never really liked the idea... maybe I just didn't see enough of it to fully understand why it is now in existence.

First, from what I've seen, it looks more than anything like a way to write database transaction commands inline with the VB code. Is this its' primary role? I can understand why the hobby programmer would like that, but as an ASP.NET developer with a SQL backend, I write all my database transactions in stored procedures in SQL itself, for the speed and for how clean it makes the code. This leaves me little motivation to use LINQ.

Second, why is the order of directives being thrown around? Every database system that I've worked with has had a similar syntax, some less similar than others, but they all have the same order of directives. Why does LINQ rearrange that?

----------


## funkyonex

Hi timeshifter,

LINQ is not specific to just querying relational data (like T-SQL or FoxPro), you can query ANY object collection in the .NET framework. You can also use LINQ to query XML (as well as DataSets and SQL server). It's not limited to flat result sets either, it can project object heirarchies as well. LINQ is a much broader set of query operations than what were used to and it's a large subject. Here are some short How-to videos to help get you started: http://msdn2.microsoft.com/en-us/vba...ectionsee#linq

HTH,
-B

----------


## Paul M

Man that "How Do I" video series is excellent  :Smilie: 

Nice video to Beth! (#1 Video in VB Section)

----------


## Merrion

> Second, why is the order of directives being thrown around? Every database system that I've worked with has had a similar syntax, some less similar than others, but they all have the same order of directives. Why does LINQ rearrange that?


For the second bit the reason is to do with intellisense and compiler determinism...

when you type:
SELECT A.

There is no way to know what list of fields to drop down because we don't know what A is until you type the FROM part.

This is also why so few database editors have intellisense like operations

----------

