public async Task <IActionResult> Edit(int id, [Bind("Id,Name,StartDateTime,CommantToExecute,Active")] ScheduledTask scheduledTask)
        {
            if (id != scheduledTask.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _repo.UpdateScheduledTask(scheduledTask);
                }
                catch (DbUpdateConcurrencyException)
                {
                    return(NotFound());
                }

                return(RedirectToAction(nameof(Index)));
            }
            return(View(scheduledTask));
        }
 public void Put(int id, [FromBody] ScheduledTask value)
 {
     value.Id = id;
     _repo.UpdateScheduledTask(value);
 }