Get stored procedure class file

After downloading the SPToCore tool, we need to get the stored procedure class file.

  1. Open the SPToCore tool using Visual Studio as shown in the following the screenshot.
  2. Open the SPToCore tool using Visual Studio
  3. Open the program.cs file in the Solution Explorer. It will look like the following screenshot.
  4. Open the program.cs file in the Solution Explorer
  5. In the code editor, enter your parameters as shown in the following screenshots.
  6. Enter your parameters in the code editor
  7. Parameter Details
  8. The following parameter details are reproduced from the SPToCore GitHub README.
  9. Parameter Details
  10. After entering the parameters, run the SPToCore tool and it will open the following window.
  11. Microsoft Visual Studio Debug Console Window
  12. After completing the tool execution, check the output folder to ensure it is as you specified in the parameter.
  13. Check the output folder to ensure it is as you specified in the parameter
  14. Open the automatically generated class file from the output folder in Visual Studio and it’ll show you the following code.
  15. Open the automatically generated class file from the output folder in Visual Studio

Now, you can attach this automatically generated class into your .NET Core application by following the steps in the next section.

#.net core #asp.net core #sql #web #.net #productivity

How to Add Stored Procedures in ASP.NET Core Apps Using SPToCore
4.15 GEEK