private List <EventModel> InitEventCollection() { var collection = collectionInitializer.Initialize <Event, EventModel>(e => e.MeetId == MeetId && EventIds.Contains(e.Id)); var sorted = collection .Select(e => new { Event = e, Rank = EventIds.IndexOf(e.Id) }) .OrderBy(a => a.Rank) .Select(a => a.Event) .ToList(); return(sorted); }