EAS-8 Refactor to avoid code duplication on DB access