Is there have any way to combine to collections from MongoDB C#
I think the problem with @as...
Created the main class which contains combinations of mail class and profile class. But different error.
In Studio 3T I am getting data
Models are shown below
var Result = await MailCollection.Aggregate()
.Lookup(
foreignCollection: ProfileCollection,
localField: e => e.SenderID,
foreignField: f => f.Id,
@as: (MailInfo profile) => profile.SenderInfo
).ToListAsync();
SenderInfo property changed to
List<Profile>