Joined November 2021
·

Steve Brailsford

I found this article researching a related topic. I have an Core 3.1 with EF web site that uses stored procs to Get/Insert/Update from tables. The procs are very simple except for a few which exec other procs to update some tables based on a field that was updated like for keeping statistics up to date. I told the DB guy, who doesn't know coding other than SQL that EF already wraps the call to the procs in a transaction, but he insists that we also use Begin Trans and End Trans in the proc. Is there any reason to do this? Also he wants to use TRY/CATCH in the procs, but I tried telling him I want the error returned from the proc so I can post a message to the screen if the proc fails. Any guidance on how an EF proc with only SP calls needs to write the procs for best practices?

Achievements
1 Karma
0 Total ProTip Views