How can the results from ToDataSourceResult be reduced down to distinct unique values?
An example of what we are doing is that we have a dropdownlist that lets a user choose a car make.
We then render the users who have ever owned a car of that make in a datagrid.
We accomplish this by adding a filter to the datasource for the car make that was selected. Similar to:
The call to the controller is essentially:
Where the view "UserCars" has a record with the Users Id, Name, and the Car Make and Model they have driven. Example:
So, if someone selects "Ford", the filter ["CarMake" EQ "Ford"] is in the "request" instance, and ToDataSourceResults(request) will return:
What we want to return in the Json is:
What is the recommended method to accomplish this?