C# Driver serializing enums as ints in aggregation pipelines (but as strings everywhere else)

Hi, @Jordan_Pitlor,

Thank you for trying your aggregation with LINQ3. I was able to reproduce the failure using the 2.15.0 driver, but not with latest. We have made a number of LINQ3-related bug fixes and improvements since 2.15.0, but they are only available in our master branch. Here are the results of running your repro using master:

Foo, Foo, Foo, Foo, Foo, Foo, Foo, Bar, Bar, Bar
aggregate([{ "$group" : { "_id" : 1, "_elements" : { "$push" : "$$ROOT" } } }, { "$project" : { "BarCount" : { "$size" : { "$filter" : { "input" : "$_elements", "as" : "row", "cond" : { "$eq" : ["$$row.Word", "Bar"] } } } }, "_id" : 0 } }])
3

We will be releasing a new version with these fixes in the coming weeks, which should resolve your issue. Thank you for your patience.

Sincerely,
James