Mark Smith

ASP.NET, SQL Server, HTML, CSS and other random thoughts!

LINQ

I have mixed feelings about LINQ. I don't want it interfering with my database, and running queries against it so I think I'll be sticking to stored procedures for this type of access. However, there are also cases where I think it is very useful.

Here's a blog post from my friend Christiaan Baes on an useful implementation of LINQ to order directories by creation date:

http://blog.baesonline.com/2008/01/17/OrderingDirectoriesByCreationDateUsingLinq.aspx
 

Edit: As Fabrice pointed out in one of the comments below, it's really DLINQ that I'm saying I'll be avoiding, and not other LINQ methods. 

Posted: Jan 25 2008, 12:57 PM by ca8msm | with 9 comment(s)
Filed under: ,

Comments

JV said:

You might want to read a bit more about LINQ, because DLINQ supports sprocs: weblogs.asp.net/.../DLINQ-with-Stored-Procedures.aspx .

# January 25, 2008 9:47 AM

Denis The SQL Menace said:

LINQ (XLINQ (also known as LINQ to XML)) is also useful when working with XML documents/data

# January 25, 2008 10:27 AM

Dave said:

I just wonder how LINQ got moved up so high for priorities for .Net? I can't believe that there were a lot of people begging for this over other more useful items in the framework. Seems more like a pet project of Hejlberg's than anything.

# January 25, 2008 10:54 AM

ca8msm said:

JV,

I'm aware of using LINQ with stored procedures...I just don't see the point. I have my logic in the SP to only return the records that I need, the records are then bound to my custom objects which I can traverse through if I need to, so why do I need LINQ?

# January 25, 2008 11:08 AM

Darren Kopp said:

I am in a similar situation, but i see one shiny gem that makes linq worth it completely: dynamic generation of sql server paging. it sucks to type that repeatedly in procedures.

# January 25, 2008 11:12 AM

chrissie1 said:

Very good blogpost ;-). And yes xlinq and linq are nice. Dlinq is less important for me since I use nhibernate and it's not that good,... yet.

# January 25, 2008 2:08 PM

Fabrice Marguerie said:

You should make it clear that you're writing about LINQ to SQL. LINQ can do much more than that. What about LINQ to Objects, LINQ to XML, LINQ to DataSet, LINQ to Flickr, LINQ to Amazon, etc.?

# January 25, 2008 9:06 PM

ca8msm said:

Good point Fabrice. It's definately the LINQ to SQL direction that I am meaning, which is why I linked to Chrissie's blog post to show that it's not all LINQ methods that I'm avoiding.

# January 26, 2008 4:06 AM

Denis the SQL Menace said:

Don't forget PLINQ (parallel LINQ)

Parallel Extensions to the .NET Framework provides Parallel Language Integrated Query (PLINQ), a declarative model for expressing parallelism. PLINQ is a query execution engine that accepts any LINQ-to-Objects or LINQ-to-XML query and automatically utilizes multiple processors or cores for execution when they are available.

msdn.microsoft.com/.../default.aspx

msdn2.microsoft.com/.../default.aspx

# January 26, 2008 9:44 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)