Esempio n. 1
0
        /// <summary>
        /// Check to see if there are any related TelegraphOperators, and load them if requested
        /// </summary>
        public static void CheckExpandTelegraphOperators(SqlDataManager sdm, IEnumerable <TelegraphStation> telegraphStations, string expandString)
        {
            var telegraphStationsWhere = CreateTelegraphStationWhere(telegraphStations);

            expandString = expandString.SafeToString();

            if (String.Equals(expandString, "all", StringComparison.OrdinalIgnoreCase) || expandString.IndexOf("telegraphOperators", StringComparison.OrdinalIgnoreCase) >= 0)
            {
                var childTelegraphOperators = sdm.GetAllTelegraphOperators <TelegraphOperator>(telegraphStationsWhere);

                telegraphStations.ToList()
                .ForEach(feTelegraphStation => feTelegraphStation.LoadTelegraphOperators(childTelegraphOperators));
            }
        }