Use dependency injection for DatabaseRepository