public async Task <IActionResult> GetByIdAsync(long id)
        {
            try
            {
                var result = await toDoTaskService.GetByIdAsync(id).ConfigureAwait(false);

                return(Ok(result));
            }
            catch (Exception)
            {
                return(BadRequest("Error occured at data load."));
            }
        }
 public async Task <ToDoTask> GetAsync(int id)
 {
     return(await _toDoTaskService.GetByIdAsync(id));
 }