Ejemplo n.º 1
0
        private static UserDto ConvertFromUser(User user)
        {
            UserDto userDto = new UserDto
            {
                Id          = user.Id,
                Name        = user.Name,
                Password    = user.Password,
                RecipeBooks = RecipeBookHelper.ConvertFromRecipeBooks(user.RecipeBooks)
            };

            return(userDto);
        }
Ejemplo n.º 2
0
        private static User ConvertToUser(UserDto userDto)
        {
            User user = new User
            {
                Id          = userDto.Id,
                Name        = userDto.Name,
                Password    = userDto.Password,
                RecipeBooks = RecipeBookHelper.ConvertToRecipeBooks(userDto.RecipeBooks)
            };

            return(user);
        }