/// <summary> /// Check to see if there are any related MCDevices, and load them if requested /// </summary> public static void CheckExpandMCDevices(SqlDataManager sdm, IEnumerable <TelegraphStation> telegraphStations, string expandString) { var telegraphStationsWhere = CreateTelegraphStationWhere(telegraphStations); expandString = expandString.SafeToString(); if (String.Equals(expandString, "all", StringComparison.OrdinalIgnoreCase) || expandString.IndexOf("mCDevices", StringComparison.OrdinalIgnoreCase) >= 0) { var childMCDevices = sdm.GetAllMCDevices <MCDevice>(telegraphStationsWhere); telegraphStations.ToList() .ForEach(feTelegraphStation => feTelegraphStation.LoadMCDevices(childMCDevices)); } }