public async Task ShouldHavePassWhenUpdateAsyncItemChange(string expectedName)
        {
            //arrange
            var entity = await _itemToDoService.GetAsync(_firstItem.Id);

            entity.Name = expectedName;

            await _itemToDoService.UpdateAsync(_firstItem);

            //actual
            var actualItem = await _itemToDoService.GetAsync(_firstItem.Id);

            //assert
            Assert.AreEqual(expectedName, actualItem.Name);
        }
        public async Task <IActionResult> OnPostUpdateAsync()
        {
            if (!ModelState.IsValid)
            {
                var items = await _itemToDoInMemoryService.BrowsAsync();

                ItemToDos = items.Select(x => new ItemToDoViewModel
                {
                    Id   = x.Id,
                    Name = x.Name
                }).ToList();

                return(Page());
            }

            await _itemToDoInMemoryService.UpdateAsync(new ItemTodo
            {
                Id   = ItemToDo.Id,
                Name = ItemToDo.Name
            });

            return(RedirectToPage());
        }