public async Task <IActionResult> Index()
        {
            ViewModel vm = new ViewModel
            {
                TodoList = await _todoListAppService.GetAllTodoListsAsync(),
                Todos    = await _todoAppService.GetAllTodosAsync()
            };

            return(View(vm));
        }
Exemple #2
0
        public void Remove_ExistingGuidPassed_RemovesOneItem()
        {
            // Arrange
            var firstTodoGuid = new Guid("29f073c4-8ef5-40a5-ad46-56ca1e0443dc");

            // Act
            var okResponse = _controller.Delete(firstTodoGuid.ToString());

            // Assert
            var allTodos = _appService.GetAllTodosAsync().Result;

            Assert.Equal(11, allTodos.Count);
        }
 public async Task <ActionResult <List <TodoItemDto> > > GetTodoItems()
 {
     return(Ok(await _todoAppService.GetAllTodosAsync()));
 }