The Mahabharatha, which is one of the two "Itihasa" texts among Hindu Scriptures,is a work by Sri Vyasa.
It also contains the "Bhagawat Gita"(BG), the discourse given by Lord Krishna to Arjuna during the onset of the battle of Kurukshetra.
Bhagawat Gita is quite popular among the users on this site and many answers cite its verses.Even the users,who say that "the Puranas are work of men",do not hesitate quoting from the BG,despite the fact ,that all major Puranas and the BG are works of the same Sri Vyasa.
The following is one such famous verse which says: 1)
śreyān sva-dharmo viguṇaḥ para-dharmāt sv-anuṣṭhitāt sva-dharme nidhanaḿ śreyaḥ para-dharmo bhayāvahaḥ
It is far better to discharge one’s prescribed duties, even though faultily, than another’s duties perfectly. Destruction in the course of performing one’s own duty is better than engaging in another’s duties, for to follow another’s path is dangerous.
And the core message or one of Gita's essence is the doctrine of "Nishkama Karma".That is doing karma without having attachments to the fruits(Karmaphala).
This kind of karma is considered the best among all kinds and is said to grant liberation(moksha).
Question-Are there verses in other major Hindu texts(like Srutis,Puranas,Smritis etc) similar in purport with the verses& messages given above?