//creata get
        public async Task <IActionResult> Create()
        {
            // ViewBag.UserId = new SelectList(await _userManager.)
            List <UserType> userType = await _userTypeManager.GetAllASync();

            List <UserTypeDto> userTypeDto = _mapper.Map <List <UserTypeDto> >(userType);
            UserAddDto         userAddDto  = new UserAddDto()
            {
                userUserTypes = userTypeDto
            };

            return(View(userAddDto));
        }
Esempio n. 2
0
        public async Task <IActionResult> Index()
        {
            List <UserType> userType = await _userTypeManager.GetAllASync();

            List <UserTypeDto> userTypeDtos = _mapper.Map <List <UserTypeDto> > (userType);

            return(View(userTypeDtos));
        }