C# MongoDB Distinct Query Syntax
You could try the following approach:
var filter = new BsonDocument();
var categoriesList = await blogContext.Articles.DistinctAsync<string>("categories", filter);
You could try the following approach:
var filter = new BsonDocument();
var categoriesList = await blogContext.Articles.DistinctAsync<string>("categories", filter);