I have the following
var key = await _referenceDataCollection.Value
.Find(filter)
.Project(c => new { c.Date, c.Data.CMAEntityId,c.Id })
.ToListAsync()
.ConfigureAwait(false);
I get this error
System.NotSupportedException: The projection specification { "CMAEntityId" : "$Data.CMAEntityId" } uses an aggregation expression and is not supported with find on servers prior to version 4.4.
at MongoDB.Driver.Core.Operations.FindProjectionChecker.
Is there a correct way to do the above with the latest driver.