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

                var items = await userTask.CreateTaskForUser(item, currentUser.Id);

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

                return(RedirectToAction("Index"));
            }

            return(View(item));
        }