Here is another great quote that I found in the Old Testament Institute manual:
"The story of Joseph, the son of Jacob who was called Israel, is a vivid representation of the great truth that "all things work together for good to [those] who love God. (Rom. 8:28) Joseph always seemed to do the right thing; but still, more importantly, he did it for the right reason. And how very, very significant that is! Joseph was sold by his own brothers as a slave and was purchased by Potiphar, a captain of the guard of Pharaoh. But even as an indentured servant, Joseph turned every experience and all circumstances, no matter how trying, into something good.
"This ability to turn everything into something good appears to be a godly characteristic. Our Heavenly Father always seems able to do this. Everything, no matter how dire, becomes a victory for the Lord. Joseph, although a slave and wholly undeserving of this fate, nevertheless remained faithful to the Lord and continued to live the commandments and made something very good of his degrading circumstances. People like this cannot be defeated, because they will not give up. They have the correct, positive attitude, and Dale Carnegie's expression seems to apply: If you feel you have a lemon, you can either complain about how sour it is, or you can make a lemonade. It is all up to you." (Hartman Rector, Jr., "Live Above the Law to Be Free," Ensign, Jan. 1973, p. 130.)