Ejemplo n.º 1
0
        // transformers //////////////////////////////////

        public static UserCredentialsDto fromUser(User user)
        {
            UserCredentialsDto result = new UserCredentialsDto();

            result.Password = user.Password;
            return(result);
        }
Ejemplo n.º 2
0
        // transformers //////////////////////////////////

        public static UserDto fromUser(User user, bool isIncludeCredentials)
        {
            UserDto userDto = new UserDto();

            userDto.Profile = UserProfileDto.fromUser(user);
            if (isIncludeCredentials)
            {
                userDto.Credentials = UserCredentialsDto.fromUser(user);
            }
            return(userDto);
        }