コード例 #1
0
        public async Task <ActionResult> Edit(TodoListViewModel item)
        {
            if (ModelState.IsValid)
            {
                var currentUser = userTask.UserAuthorizationCheck(User.Identity.Name);

                await userTask.EditTaskForUser(item, currentUser.Id);

                TempData["Success"] = "The item has been updated!";

                return(RedirectToAction("Index"));
            }

            return(View(item));
        }