Correct way of Registering Service Provider for the Dependency.