R
R
run1822019-06-07 22:48:45
Microsoft Azure
run182, 2019-06-07 22:48:45

How to run a procedure from WebJobs on SQL Server?

This is my first time working on c# and with Azure, I managed to create a simple web task, but how to run a procedure, passing parameters to it and get a response from it?

using System;
using System.Configuration;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using System.Data.SqlClient;
using Microsoft.Azure.WebJobs;

namespace WebJob2
{
    class Program
    {
        static void Main()
        {
            var config = new JobHostConfiguration();

            if (config.IsDevelopment)
            {
                config.UseDevelopmentSettings();
            }

            var host = new JobHost(config);
            host.RunAndBlock();
        }
    }

}

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question