RSS Feed for This PostCurrent Article

SubSonic: Select Distinct Column Values

To do a select distinct from a column for a database table using SubSonic, it is very straightforward

Below is the code to get the unique customer number from the Customer table, and order them in descending order

   1: Customer.All().Select(c => c.CustomerNo).Distinct().OrderByDescending(c => c)


Trackback URL

Sorry, comments for this entry are closed at this time.