• I work a system with hundreds of tables and we did have two stored procedures for each that were dynamically generated using our code generator. We've now moved away from this since the code foot print was huge and simple insert, update and delete statements could be better achieved in our c# code.

    We have a code generator that creates a c# class (in our data layer) for evert table and then calling methods (that were dynamically generated based on table indexes and columns etc) this dynamically generates the sql and executes using sp_executesql. This change in how we execute these statements has been really well received, leaving the stored procedures for more complex tasks, reducing the vast no. of sp's we had and making it far more manageable.

    Nice article though 🙂