Let's assume I have a class like this:
class MyObject
{
public string Color { get; set; }
....
}
and I have a collection of MyObject in MongoDB.
How can I go through the collection and make a list of all the unique colors?
At the end, I'd like a List that contains one entry per color { "yellow", "pink" } for example.