It was good of you

How does latin express the …of… in sentences like these? :

It was good of you to do this;

It wasn’t very nice of him to do that.

Gratias ago