Stored procedures are a great starting point for getting into SQLCLR because they are easy to implement. To do so, right-click your new project in VS’s Solution Explorer and then select Add, Stored Procedure. Name your new class
StoredProcedures.cs. A partial class of that name opens in the VS code window. Note that VS automatically adds the required reference to
Microsoft.SqlServer.Server and its associated
Microsoft.SqlServer.Server contains the
SqlProcedure attribute required for turning ordinary methods into SQLCLR stored procedures.
Change your autogenerated method name from
GetProductReviews. Next, if you’re not working in VS, you need to decorate this method with ...