public async Task <ActionResult> RemoveTask(int id) { int result = await _repository.RemoveTaskAsync(id); if (result != 0) { return(new JsonResult(new { Success = true })); } return(new JsonResult(new { Success = false })); }