f-miyu / Plugin.CloudFirestore

MIT License
121 stars 44 forks source link

Subcollections #51

Closed Frank-Dev18 closed 3 years ago

Frank-Dev18 commented 3 years ago

How to get subcollections from all documents? I'm make a little social app and i need this for get the posts of my friends. Thanks for read me, have a good day.

AntvissMedia commented 3 years ago

Something like this perhaps?

CrossCloudFirestore.Current.Instance
                .GetCollection("COLLECTION_1")
                .GetDocument("DOCUMENT_1")
                .GetCollection("SUBCOLLECTION")
                .GetDocument("SUBCOLLECTION_DOCUMENT");
Frank-Dev18 commented 3 years ago

I managed to fix it using the Linq library now it works properly and better than I expected. now i can recreate everything a social network app could do. Thanks for this wonderful package!, I leave you a screenshot of my App Screenshot_20200728_165240_com vsnetwork fm

AntvissMedia commented 3 years ago

@Frank-Dev18 looks good, man! Really good. Are you logging users in with social accounts? Through firebase?

Frank-Dev18 commented 3 years ago

@ Frank-Dev18 se ve bien, hombre! Realmente bueno. ¿Estás registrando usuarios con cuentas sociales? A través de la base de fuego?

For now I use it creating accounts in the same database, as I only use it with my group of friends to do the tests, I use firestorage to save the profile photos and the images that are posted, when a user logs in their information ( name, photo (link), password, etc ...) is saved locally in the app and when session is closed it is deleted. I still have to add more options, but so far it has several options such as receiving notifications (like, comment, friend request, messages can be sent through a person's profile or from the chat section). Maybe soon I will also make your website