Ejemplo n.º 1
0
        /// <summary>
        /// Check to see if there are any related Shots, and load them if requested
        /// </summary>
        public static void CheckExpandShots(SqlDataManager sdm, IEnumerable <Scene> scenes, string expandString)
        {
            expandString = expandString.SafeToString();

            if (String.Equals(expandString, "all", StringComparison.OrdinalIgnoreCase) || expandString.IndexOf("shots", StringComparison.OrdinalIgnoreCase) >= 0)
            {
                var scenesWhere = CreateSceneWhere(scenes, "Scene");
                var childShots  = sdm.GetAllShots <Shot>(scenesWhere)
                                  .OrderBy(orderBy => orderBy.Name)
                ;

                scenes.ToList()
                .ForEach(feScene => feScene.LoadShots(childShots));
            }
        }