1
Answer

Linq To Sql - Distinct

Alex Brown

Alex Brown

15y
11.5k
1
i want to return a disctinct list of manufacturers from my products table.
so far i got:

var manufacturers = db.ExecuteQuery<string>("SELECT DISTINCT Manufacturer FROM Product");

seems a little... dirty?

is there a better way of doing it? i only want to return a List<string> or something similar...
Answers (1)