How popular are stored procedures today, compared to 5 years ago?

I ask this question because the book that I'm reading (an ASP.NET 4 book) has no stored procedures in it. Is it the ASP.NET 4 way now?

closed as primarily opinion-based by gnat, Kilian Foth, GlenH7, user40980, Dan Pichelman Oct 22 '14 at 16:31

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 4
    Stored Procedures usually refer to DB objects... Why would the author want to open that box? It outside the scope of the book! – Morons Mar 15 '11 at 19:44
  • I was taught it was the default way to access databases as an ASP.NET Junior back in 2005. – TeaDrinkingGeek Mar 15 '11 at 19:48
  • @Morons You should add that to your answer. It's a fair point. :) – Adam Lear Mar 15 '11 at 20:26
  • Done.........10 – Morons Mar 15 '11 at 20:42
  • What's the book your reading, by the way? – Carson63000 Mar 15 '11 at 23:03

Stored Procedures usually refer to DB objects... Why would the author want to open that box? It outside the scope of the book!

Read up on SPs...



ASP.net Data Access:


Calling an SP from ASP.net:



I would say, just based on my own opinion and recent experience, that a good many developers are opting for ORM tools that abstract away all of the database code. That can make stored procs less necessary because the ORM framework is doing everything you would do in a stored proc (theoretically).

You'll find a lot of inline SQL vs. stored procs debate on the web. I don't have a strong opinion one way or the other except that inline SQL should always be parameterized rather than spaghetti-coded with a bunch of concatenations.

But stored procs are definitely still very popular and aren't going anywhere.


The .Net world is seeing an emergance of ORM systems like NHibernate and LINQ to Entities these systems lessen the need for stored procedures in a .net system.


What data access API does your book cover? I would hope that it would be Entity Framework, since that is the Microsoft-endorsed API of the moment.

You can certainly use stored procedures easily through Entity Framework, they basically get mapped as methods on your ObjectContext. If they perform selects you can map the results to either a new class or an existing class; if they just perform updates it's even simpler.

Here's a blog post giving a quick overview: http://blogs.msdn.com/b/bindeshv/archive/2008/11/20/using-stored-procedures-in-entity-framework.aspx

Not the answer you're looking for? Browse other questions tagged or ask your own question.