public static IQueryable GetDistinctProdType( this IQueryable query, int categoryId) { return (from p in query where p.CatID == categoryId select p.Type).Distinct(); }