public async Task OnGet() { ToDos = await _repository.GetAllToDos(); }
/// <summary> /// Gets all to dos. /// Loads view with all to dos. /// </summary> /// <returns></returns> public async Task <IActionResult> Index() { var toDos = await _repository.GetAllToDos(); return(View(_mapper.Map <IEnumerable <ToDoReadDto> >(toDos))); }