I would like to create a stored procedure in my database from within C# code.
How can I do this?
FOR INSTANCE: Using Microsoft SQL Server, I just want to create a stored procedure sp_GetUsers in the database that takes an int parameter userid and a simple statement such as
SELECT * FROM Users WHERE ID = @userid
This would be great because I could check the DB for the existence of that stored procedure, and if it doesn't, I just create from within code.