I have a stored proc .sql file on my system. I want to be able to move this file into database as a sp from C# code.
i could open the file, read it in as a string, and execute it but I feel like there should be a better way.
why not ? it's a simple way and it works, you read the sql script from the file and execute it
I think this way it's just fine
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With