예제 #1
0
        public IActionResult Create([Bind("Id,Description, State, UserId")] Task task)
        {
            if (ModelState.IsValid)
            {
                _api.AddTask(task.UserId, task.Description, task.State);
                return(RedirectToAction("Index", "Tasks", new { userId = task.UserId }));
            }

            return(View(task));
        }