Inject provider object directly

Instead of passing a class name, inject the provider object directly.