using System;
using System.Data;
using System.Data.SqlClient;
using System.Data.SqlTypes;
using Microsoft.SqlServer.Server;


public partial class StoredProcedures
{
  //code to insert data in a stored procedure
  [Microsoft.SqlServer.Server.SqlProcedure]
  public static void InsertRowOfTestData()
  {
    string connStr = "context connection=true";
    using (SqlConnection conn = new SqlConnection(connStr))
    using (SqlCommand cmd = 
      new SqlCommand("insert into test values ('testdata')", conn))
    {
      conn.Open();
      int rows_affected = cmd.ExecuteNonQuery();
    }
  }  

};
