Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolving FirestoreDb Instance for CloudFirestoreOptions in Program.cs #2372

Open
SteGaff7 opened this issue Feb 7, 2025 · 0 comments
Open

Comments

@SteGaff7
Copy link

SteGaff7 commented Feb 7, 2025

My knowledge of dependency injection and the service provider during configuring services is quite limited so I might be missing something obvious, but I am struggling to work around the ASP0000 error when trying to pass my FirestoreDb singleton to the CloudFirestoreOptions while adding the Firestore Health Check.

What would you like to be added:
An overload which gives access to the service provider when adding the CloudFirestoreOptions (if this resolves the issue)
Automatically resolve FirestoreDb dependency using the registered instance during service registration

Why is this needed:
It would address the ASP0000 warning
It would prevent me from creating an instance of the database in the program.cs file and passing it to both service registration and health check method

Thanks
Stephen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant