예제 #1
0
        // GET: TodoList/Create
        public async Task <IActionResult> Create()
        {
            ToDoItem todo = new ToDoItem();

            try
            {
                List <string> result = (await _todoListService.GetAllUsersAsync()).ToList();

                TempData["UsersDropDown"] = result
                                            .Select(u => new SelectListItem
                {
                    Text = u
                }).ToList();
                TempData["TenantId"]   = HttpContext.User.GetTenantId();
                TempData["AssignedBy"] = HttpContext.User.GetDisplayName();
                return(View(todo));
            }
            catch (WebApiMsalUiRequiredException ex)
            {
                return(Redirect(ex.Message));
            }
        }