Stored Procedures Vs. No Stored Procedures

There is this debate raging among developers: “Is it better to use stored procedures or not use stored procedures”.  From first glance, this seems like a simple question, but there are some complicated implications around this question.  Here’s the basic pros and cons of using stored procedures in your system: Pros You can isolate table … Read moreStored Procedures Vs. No Stored Procedures

EF Code-First Stored Procedures With Parameters

Summary In an earlier post I showed how to create a method that can access a stored procedure using Entity Framework Code-First. In this post I’m going to show how to pass parameters and show a few tricks. The Stored Procedure First, you’ll need to create a new stored procedure in your APIUniversity database (see … Read moreEF Code-First Stored Procedures With Parameters

EF Code-First Stored Procedures

Summary In this post I’m going to show the very basics of calling a stored procedure from Entity Framework using the Code-First technique. The Database Setup First, I’m going to create a database named “APIUniversity”. If you’ve tried out the API projects from my previous posts, you probably already have this database in place and … Read moreEF Code-First Stored Procedures

Fluent NHibernate Execute Stored Procedure

Summary I’ve demonstrated stored procedures a couple of times on this blog, but this time I’m going to show you how to execute a stored procedure that doesn’t need to return a value. You can use the same syntax to execute an update, insert or delete query (in cases where you might want to make … Read moreFluent NHibernate Execute Stored Procedure

Fluent NHibernate More Stored Procedures Without Mapping

I did a sample post on how Fluent NHibernate executes a stored procedure, but I didn’t dig into the subject and show some details. The sample I showed returned a list of tables that were already mapped and it made the whole sample easy, but not realistic. In most cases we want to execute a … Read moreFluent NHibernate More Stored Procedures Without Mapping

Fluent NHibernate Stored Procedure

Summary This week I’m going to give a very simple example of how to execute a stored procedure.  The stored procedure will only do a select query, but I’ll pass a variable to demonstrate how it’s done and I’ll leave it up to the reader to alter the code to execute other types of stored … Read moreFluent NHibernate Stored Procedure