public ActionResult Delete(int id, [FromQuery] int userId) { try { _toDoService.DeleteTask(id, userId); return(Ok("Success")); } catch (Exception ex) { return(BadRequest(ex.Message)); } }