public IActionResult SetPercentage([FromBody] SetTodoPercentCompleteDto setTodoPercentCompleteDto)
 {
     try
     {
         var result = _todoService.SetTodoPercentComplete(setTodoPercentCompleteDto);
         return(Ok(result));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
        public Todo SetTodoPercentComplete(SetTodoPercentCompleteDto setTodoPercentCompleteDto)
        {
            try
            {
                var existing = GetById(setTodoPercentCompleteDto.Id);

                existing.PercentComplete = setTodoPercentCompleteDto.PercentComplete;

                Update(setTodoPercentCompleteDto.Id, existing);

                return(existing);
            }
            catch (Exception e)
            {
                throw e;
            }
        }