public async Task <IActionResult> GetById(int id) { var todo = await _todoRepo.GetTodoByID(id); return(Ok(todo)); }
public Todo GetTodoByID(int id) { return(toDo.GetTodoByID(id)); //call GetTodayByID method with parameter id }