© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•16mo ago•
2 replies
Zoli

How to get documents for specific user by Cloud Firestore?

I am developing a .NET MAUI application where users can register and sign in. After logging in, they can perform CRUD operations on documents. Each document saved to Cloud Firestore includes a user_id or owner_id property to indicate the owner.
What is the best way to filter documents so that I only retrieve those associated with a specific user?
Currently, I am using:
CollectionReference documentsRef = db.Collection("documents");
CollectionReference documentsRef = db.Collection("documents");

and then querying for documents where UserId equals the currentUserId.
Is this the correct approach, or does this method initially retrieve all documents from the collection (for all users) before filtering by UserId?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ how to logout specific user with identityserver
C#CC# / help
4y ago
❔ How to close a listener firestore.
C#CC# / help
3y ago
❔ How to get specific fields from a Http GET request
C#CC# / help
3y ago