Welcome to the MongoDB Community! You appear to be running into issues defining modulo filter definitions. The Mod method cannot accept a field definition for either the modulus or remainder argument, both must be of type long:
public FilterDefinition<TDocument> Mod(
Expression<Func<TDocument, Object>> field,
long modulus,
long remainder
)
Our LINQ provider unfortunately does not support this construction either.
If you need to specify a field definition for the modulus parameter, you will have to write the FilterDefinition using MQL and use the implicit conversion operator from JSON:
FilterDefinition<BsonDocument> filter = "{ x: 1 }"; // <-- Your MQL would go here
You can file a request for this feature to be supported in our builders and/or LINQ.