وعن أنس رضي الله عنه قال قال رسول الله صلى الله عليه و سلم سبع يجرى للعبد أجرهن وهو في قبره بعد موته من علم علما أو كرى نهرا أو حفر بئرا أو غرس نخلا أو بنى مسجدا أو ورث مصحفا أو ترك ولدا يستغفر له بعد موته. رواه البزار وأبو نعيم في الحلية وقال هذا حديث غريب من حديث قتادة تفرد به أبو نعيم عن العزرمي ورواه البيهقي (الترغيب والترهيب 1/124)
Hadhrat Anas (Radhiyallahu Anhu) reports that Rasulullah (Sallallahu Alaihi Wasallam) said: “There are seven such actions that a servant carries out, the reward of which will continue to be written for him in his grave after his demise; (1) the one who had imparted some Deeni knowledge, (2) or dug a canal, (3) or dug a well, (4) or planted a tree, (5) or built a Musjid, (6) or left a Qur’an in inheritance, (7) or left behind a child who seeks forgiveness on his behalf after his demise.”
Note: As long as people continue to benefit from the good deeds one had carried out during his lifetime, one will perpetually continue to receive rewards in the grave e.g. people continued to practise upon the Deeni knowledge he had imparted to them, or continued to benefit from the canal or well he had dug, or they continued eating from the fruit of the tree he had planted, or they continued to recite from the Qur’an he left behind in inheritance, or the pious offspring that he had left behind continue making duaa for him.