DEV Community

Discussion on: T-SQL CRUD procedures auto-generator

Collapse
 
dmfay profile image
Dian Fay

It's an interesting exercise in code generation, but I'm more curious about the why: what's going on that you need to perform basic CRUD through procedures instead of emitting the SQL statements directly?

Collapse
 
peledzohar profile image
Zohar Peled

In my workplace we don't use sophisticated ORMs. The ORM of choice is Dapper, and this means that we need to write the SQL ourselves. (Which personally, I like because it gives me a lot of control over the SQL). Admittedly, a lot of the SQL we need we will not get out of the box with this script - but as I've written in the full article - that's not what this script is supposed to do anyway.