Take a look at the following examples from Doctrine and Covenants that teach salvation by good works, personal merit and keeping the law:
He that repents and does the commandments of the Lord shall be forgiven;... (Doctrine and Covenants 1:32)
And those who receive it [the truth of the Mormon Church] in faith, and work righteousness, shall receive a crown of eternal life [exaltation as God];... (Doctrine and Covenants 20:14)
Wherefore, give heed unto these things and be diligent in keeping my commandments, and you shall be blessed unto eternal life. Amen. (Doctrine and Covenants 30:8)
And whoso is found a faithful, a just, and a wise steward shall enter into the joy of his Lord, and shall inherit eternal life. (Doctrine and Covenants 51:19)
And, if you keep my commandments and endure to the end you shall have eternal life, which gift is the greatest of all the gifts of God. (Doctrine and Covenants 14:7)
But learn that he who doeth the works of righteousness shall receive his reward, even peace in this world, and eternal life in the world to come. (Doctrine and Covenants 59:23)
And that you be firm in keeping the commandments wherewith I have commanded you; and if you do this, behold I grant unto you eternal life, even if you should be slain. (Doctrine and Covenants 5:22)
... if he [Joseph Smith] shall be diligent in keeping my commandments he shall be blessed unto eternal life.... (Doctrine and Covenants 18:8)
Herein is glory and honor, and immortality and eternal life—The ordinance of baptism by water, to be immersed therein in order to answer to the likeness of the dead [baptism for the dead].... (Doctrine and Covenants 128:12)
The Book of Mormon, teaches salvation by good works:
And whosoever doeth this, and keepeth the commandments of God from thenceforth, the same will remember that I say unto him, yea, he will remember that I have said unto him, he shall have eternal life, according to the testimony of the Holy Spirit, which testifieth in me. (Book of Mormon, Alma 7:16)