using System.Collections.Generic; using System.Linq; namespace Start.Shared { public static class SortingExtensions { public static IEnumerable SortContainers( this IEnumerable bookmarkContainers) { return bookmarkContainers .OrderBy(bc => bc.SortOrder) .ThenBy(bc => bc.BookmarkContainerId); } public static IEnumerable SortGroups( this IEnumerable bookmarkGroups) { return bookmarkGroups .OrderBy(bg => bg.SortOrder) .ThenBy(bg => bg.BookmarkGroupId); } public static IEnumerable SortBookmarks( this IEnumerable bookmarks) { return bookmarks .OrderBy(b => b.SortOrder) .ThenBy(b => b.BookmarkId); } } }