Esempio n. 1
0
        public IActionResult Get(int id)
        {
            var taskDto = _toDoTaskServices.GetTask(id);

            if (taskDto != null)
            {
                return(new JsonResult(taskDto));
            }

            return(BadRequest());
        }
 public ActionResult <ToDoTaskModel> Get(int id, [FromQuery] int userId)
 {
     try
     {
         return(Ok(_toDoService.GetTask(id, userId)));
     }
     catch (Exception ex)
     {
         return(BadRequest(ex.Message));
     }
 }