Exemplo n.º 1
0
        private void Sort()
        {
            StoresGrouped.Clear();
            var sorted = from store in Stores
                         orderby store.Country, store.City
            group store by store.Country into storeGroup
                select new Grouping <string, Store>(storeGroup.Key, storeGroup);

            StoresGrouped.ReplaceRange(sorted);
        }
Exemplo n.º 2
0
        private void Sort()
        {
            StoresGrouped.Clear();
            var sorted = from store in Stores
                         orderby store.Country, store.City
            group store by store.Country into storeGroup
                select new Grouping <string, Store>(storeGroup.Key, storeGroup);

            foreach (var sort in sorted)
            {
                StoresGrouped.Add(sort);
            }
        }
Exemplo n.º 3
0
        private void Sort()
        {
            StoresGrouped.Clear();

            //var sorted = from store in Stores
            //             orderby store.Country, store.City
            //             group store by store.Country into storeGroup
            //             select new Grouping<string, Store>(storeGroup.Key, storeGroup);

            var sorted = from store in Stores
                         orderby store.Name, store.City
            group store by store.Name into storeGroup
                select new Grouping <string, CommonYelpClass>(storeGroup.Key, storeGroup);

            StoresGrouped.ReplaceRange(sorted);
        }