for more detail on your procedure writing please refer this link
Sql Server - How to write a Stored procedure in Sql server[
^]
and you can simply call your procedure using this type c# code.
//C#
try
{
sqlConnection = new SqlConnection(dbConnectionString);
SqlCommand command = new SqlCommand("Your procedure name", sqlConnection);
command.CommandType = CommandType.StoredProcedure;
command.Parameters.Add("@PARAMNAME1", SqlDbType.VarChar).Value = "YOUR VALUE"
command.Parameters.Add("@PARAMNAME2", SqlDbType.VarChar).Value = "YOUR VALUE"
sqlConnection.Open();
return command.ExecuteNonQuery();
sqlConnection.Close();
}
catch (SqlException ex)
{
Console.WriteLine("SQL Error" + ex.Message.ToString());
return 0;
}
or for more detail on this please refer this link...
Create CLR Stored Procedure with Visual Studio Express Edition[
^]