Esempio n. 1
0
        public List <RoleUserDto> GetRolesByUser(int userID)
        {
            List <RoleUserDto> roleUserDtos = new List <RoleUserDto>();
            var roleUsers = _roleUserRepository.GetRolesByUser(userID);

            foreach (var roleUser in roleUsers)
            {
                RoleUserDto roleUserDto = new RoleUserDto();
                roleUserDto.RoleID = roleUser.RoleID;
                roleUserDto.UserID = roleUser.UserID;
                roleUserDtos.Add(roleUserDto);
            }
            return(roleUserDtos);
        }