public async Task <GetAllToDoView> GetAll() { IEnumerable <ToDoTask> existingToDos = await _toDoTaskRepository.GetAll(); var result = new GetAllToDoView(); result.ToDos = existingToDos.Select(p => MapToDoTaskToView(p)).OrderBy(p => p.ToDo).ToList(); return(result); }
public async Task <ActionResult> GetAll() { GetAllToDoView result = await _toDoService.GetAll(); return(Ok(result)); }