EditElementRewriter is a trivial C++ class that helps encourage use of the correct idiom when modifying a DGN element.
EditElementRewriter
It's modest in size and stored in a *.hpp file. This article discusses EditElementRewriter in more detail.
*.hpp