Exemple #1
0
        public async Task <IActionResult> Update(UpdateViewModel model)
        {
            if (!ModelState.IsValid)
            {
                return(View(model));
            }
            await _toDoItemService.UpdateItemAsync(new ToDoItem()
            {
                Id = model.Id, Name = model.Name
            });

            return(RedirectToAction(nameof(Index)));
        }