-
Dec 12th, 2007, 06:05 PM
#1
Question on LINQ
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?
-
Dec 12th, 2007, 07:40 PM
#2
Special Guest - Microsoft
Re: Question on LINQ
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
-
Dec 12th, 2007, 10:00 PM
#3
Re: Question on LINQ
Man that "How Do I" video series is excellent
Nice video to Beth! (#1 Video in VB Section)
-
Dec 13th, 2007, 05:00 AM
#4
Re: Question on LINQ
Originally Posted by timeshifter
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|