public static async Task <IActionResult> SchedulersDelete(
     [HttpTrigger(AuthorizationLevel.Anonymous, "delete", Route = "workflows/{workflowId}/schedulers/{id}")] HttpRequest req,
     ILogger log, int workflowId, int id)
 {
     using (var da = new SchedulersDataAccess(conStr))
     {
         return(new OkObjectResult(await da.DeleteAsync(id)));
     }
 }
 public static async Task <IActionResult> SchedulersGet(
     [HttpTrigger(AuthorizationLevel.Anonymous, "get", Route = "workflows/{workflowId}/schedulers")] HttpRequest req,
     ILogger log, int workflowId)
 {
     using (var da = new SchedulersDataAccess(conStr))
     {
         return(new OkObjectResult(await da.GetSchedulers(Convert.ToInt32(workflowId))));
     }
 }
        public static async Task <IActionResult> SchedulersUpdate(
            [HttpTrigger(AuthorizationLevel.Anonymous, "put", Route = "workflows/{workflowId}/schedulers/{id}")] HttpRequest req,
            ILogger log, int workflowId, int id)
        {
            string  requestBody = await new StreamReader(req.Body).ReadToEndAsync();
            dynamic data        = JsonConvert.DeserializeObject <Scheduler>(requestBody);

            data.WorkflowId = workflowId;

            using (var da = new SchedulersDataAccess(conStr))
            {
                return(new OkObjectResult(await da.UpdateAsync(data)));
            }
        }