I have read about this a lot, but never in C#:
I am trying to access a user and his profile picture:
tblUsers -> 1 (id) -> name: test, age : 12
tblUserPic -> 1 (id) ->picture : long pic, belongsTouserID: 1
So every user has a profile picture and I wanna "join" those tables together and get the user and his profile picture.
I was able to get either:
public static async Task<Dictionary<string, object>> GetElementById(FirestoreDb db, Documents collection, string documentId)
{
DocumentReference docRef = db.Collection(collection.ToString()).Document(documentId);
DocumentSnapshot snapshot = await docRef.GetSnapshotAsync();
if (snapshot.Exists)
{
return snapshot.ToDictionary();
}
else
{
return null; ;
}
}
But never both.
How can I "join"? Or what is the fastest way of getting my data?