Or better yet, refactor your app so it doesn't require so much boilerplate - surely if you're doing the same thing over and over again you can just extract it into it's own function / method and abstract over it.