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); }
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); }