Dry-ed logic to retrieve data from database to a repository module