ProductCollection select = new
Select(Product.SupplierIDColumn).From<Product>().Distinct()
.ExecuteAsCollection<ProductCollection>();
http://subsonicproject.com/docs/Distinct
From above example I am trying to get distinct category from my table but many problems comes
Product.SupplierIDColumn
I dont know why my class EventListing
has no intellisense for these columnsDistinct()
function is not available after From<EventListing>()
.Interestingly, it looks like the SqlQuery class in SubSonic 2 had a Distinct() method, but the SqlQuery class in SubSonic 3 does not. You could try SS2 instead of 3, or if you are using 3, I suggest using Linq expressions instead. In other words, something like:
var data = (from x in db.Products
select x.SupplierId)
.Distinct();
-or-
var data = db.Products.Select(x => x.SupplierId).Distinct();