I have a data that is comming from the database and going into PagedDataSource. The data is from a query which pull some 10 records with some 20 column. Based on one varchar column name `source', I want to find unique instances of the source. This is a very basic query. In SQL I would do this:
select count(distinct source) from SourceTable
I have tried the following, which does give count but not distinct (or unique) count.
Dim query = Aggregate source In pagedDS
Into Count()
I do not know how to select column in LINQ queries and how to apply aggregate by just one column. I need this in VB.NET but a C# solution should be close enough.