public IActionResult Create(UpdateTaskViewModel taskModel, int userId, string userName) { if (ModelState.IsValid) { _taskRepository.AddOrUpate(new TaskModel() { CreateTime = DateTime.Now, Description = taskModel.Description, Owner = userId, Status = taskModel.Status, Tag = taskModel.Tag, Type = taskModel.Type }); return(RedirectToAction(nameof(Index), new { userId, userName })); } return(View(taskModel)); }