To standardize and speed up stored procedure writing, I developed a simple application SQL Server Stored Procedure Helper to create basic code for following CRUD operations in no time:
- Create as Add
- Read as Get
- and ReadAll as GetAll(additional)
User just have to perform following actions:
- Run Application
- Provide Connection String
- Provide Author Name for Comment
- Provide prefix for stored procedure name if required
- Load Database
- Generate Script
- Execute Scripts on Database
- Every table must have Identity Column and that will be Primary key too.
- For Add and Update operations may work without any change for full object.
- For Delete operation user may have to handle calls to delete child data as per requirement.
- For Get operation, user may get standard object for given identity/primary key.
- For GetAll operation user may have to code joins as per requirements.