Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Obtaining like records
Message
From
24/10/2011 14:37:14
John Baird
Coatesville, Pennsylvania, United States
 
 
To
24/10/2011 13:42:55
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
General information
Forum:
ASP.NET
Category:
LINQ
Environment versions
Environment:
C# 3.0
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01527091
Message ID:
01527215
Views:
41
hi Tim,

In the following query, I am selecting all CategoryTypes and creating an IEnumerable OF IEnumerable - IGrouping, I think. What I get though is a list of Categorytype with an embedded igrouping of categories which belong to the parent category. You could use similar logic, I think:
            var query = from c in _unGroupedCategoryList
                        orderby c.CategoryTypeName, c.CategoryName
                        group c.CategoryName by c.CategoryTypeName into cats
                        select cats;

            this.CategoryList = query.ToList();
Previous
Reply
Map
View

Click here to load this message in the networking platform