Exemplo n.º 1
0
 public async Task OnGet()
 {
     ToDos = await _repository.GetAllToDos();
 }
Exemplo n.º 2
0
        /// <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)));
        }