Exemplo n.º 1
0
        public ActionResult <BaseResponse> Info()
        {
            var user    = _accountStoreService.QueryUserInfo(GetUserId());
            var userDto = _mapper.Map <UserDto>(user);

            var roles = user.UserRoleRelations.Select(x => _mapper.Map <RoleDto>(x.Role)).ToList();

            return(BaseResponse <UserInfoResponse> .GetBaseResponse(new UserInfoResponse()
            {
                User = userDto, Roles = roles
            }));
        }