Should you use Stored Procedures with LINQ?

I’ve had the discussion many times about whether or not to use Stored Procedures when consuming my LINQ to SQL or Entity Framework models.  I think that Lenni has come up with an excellent compromise in his Rethinking the Dynamic SQL vs. Stored Procedure Debate with LINQ blog post. 

Basically, he thinks we use LINQ for SELECT operations, harnessing Dynamic SQL, and continue to use Stored Procedures for the INSERT, UPDATE and DELETE operations.

Lenni is a SQL Server guru who basically wrote the book on Programming SQL Server.  His deep analysis of the debate is spot on.  Although, I still strive to use full capabilities of the ORM; I can see the need for maintaining  control of the data manipulation using Stored Procedures.  Also, since you’re often writing way less than half as much data as you’re reading, you shouldn’t see a any real performance decrease for not utilizing a partial UPDATE statement.  I hope this will encourage the strict DBAs to allow more dynamic SQL into the DB.

Advertisements

0 Responses to “Should you use Stored Procedures with LINQ?”



  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




What else am I doing?

StackOverflow Facebook Twitter LinkedIn Live

Twitter

Pages

August 2009
M T W T F S S
« Jul   Nov »
 12
3456789
10111213141516
17181920212223
24252627282930
31  

%d bloggers like this: