Ejemplo n.º 1
0
        public static List <Common.Data.Models.DigitalWallDto> GetDtoDigitalWallListFromMcDigitalWallList(IEnumerable <McDigitalWall> McDigitalWallList)
        {
            List <Common.Data.Models.DigitalWallDto> dtoDigitalWallList = new List <Common.Data.Models.DigitalWallDto>();

            foreach (var McDigitalWall in McDigitalWallList)
            {
                dtoDigitalWallList.Add(DigitalWallMapper.GetDtoDigitalWallFromMcDigitalWall(McDigitalWall));
            }

            return(dtoDigitalWallList);
        }
Ejemplo n.º 2
0
        public static ObservableCollection <McDigitalWall> GetMcDigitalWallListFromDtoDigitalWallList(IEnumerable <McSourceInstance> sourceInstances, IEnumerable <Common.Data.Models.DigitalWallDto> dtoDigitalWallList)
        {
            ObservableCollection <McDigitalWall> McDigitalWallList = new ObservableCollection <McDigitalWall>();

            foreach (var dtoDigitalWall in dtoDigitalWallList)
            {
                var matchingSourceInstanceList = sourceInstances.Where(s => s.WallId == dtoDigitalWall.Id);
                var matchingSourceInstanceOc   = new ObservableCollection <McSourceInstance>(matchingSourceInstanceList);
                McDigitalWallList.Add(DigitalWallMapper.GetMcDigitalWallFromDtoDigitalWallAndSourceInstances(dtoDigitalWall, matchingSourceInstanceOc));
            }

            return(McDigitalWallList);
        }