I know that you have already accepted your answer, but I still wanted to show you a good alternative, which can be useful in your case. Now or in the future.
When using stored procedures, it is advisable to use T4
I try to use stored procedures in my project, even if it does not use PetaPoco, Dapper or Massive (the project started earlier than they were here). Instead, it uses BLToolkit. Anyway. Instead of writing my methods for running stored procedures and writing code to provide stored procedure parameters, I wrote a T4 template that generates code for me.
When changing stored procedures (some can be added / deleted, added / deleted / renamed / retyped parameters), my code will be broken into compilation, because method calls will no longer match their signature.
I store my stored procedures in a file (so that they control the version). If you work in a team with several developers, it may be wise to store the stored procedures each in its own file. This makes updates much less painful. I tried this on some project and it worked fine until the amount of SP is huge. You can rebuild them into folders based on the entity with which they are associated.
Anyway. Maintenance involves stored procedures, changing the code is just a click of a button in Visual Studio, which immediately converts all T4. You do not need to look for methods that use these procedures. Errors will be reported during compilation. The only thing to worry about.
Therefore, instead of writing
using (var db = new DbManager()) { return db .SetSpCommand( "Person_SaveWithRelations", db.Parameter("@Name", name), db.Parameter("@Email", email), db.Parameter("@Birth", birth), db.Parameter("@ExternalID", exId)) .ExecuteObject<Person>(); }
and having a bunch of magic lines, I can simply write:
using (var db = new DataManager()) { return db .Person .SaveWithRelations(name, email, birth, exId) .ExecuteObject<Person>(); }
Itβs better, it breaks cleaner at compilation and provides intellisense, so it also develops faster.
It's good that stored procedures can become very complex and can do a lot. In my upper example, I check some data, insert a person record and some associated with it, and at the end it returns a newly inserted Person record. Insertions and updates usually should return data that has been added / changed to reflect the actual state.