abstract the common logic into DataSourceConfiugrationBase