I have created a popup for guests on my website so when they complete their order, they will be redirected to a confirmation/receipt page. At that point, since they are checking out as a guest and have not created an account, the popup will show asking them to enter in a password if they choose too. This way they can login with their email and password.
I have created a stored procedure in SQL Server that looks for their customer ID and updates their password field.
My question is how do I call that procedure and attach it to the form on my website so that it will update the password? I'm not sure which way to go about it and I want to avoid SQL injection.
Add "ADO.NET Entity Data Model" to your project using the Add New Item menu to a project.
If you open the Context you will see the code for the SP
If you make any changes to the SP or model, just right click the .EDMX file and use the "Update From Database" option to refresh or add new Tables or SP
P.S. You need to install EntityFramework