Пример #1
0
        public IEnumerable <FotoViewModel> GetAllFoto()
        {
            IEnumerable <FotoDTO> fotoDTOs = travelService.GetAllFotoList();

            Mapper.Initialize(cfg => cfg.CreateMap <FotoDTO, FotoViewModel>());
            var fotos = Mapper.Map <IEnumerable <FotoDTO>, List <FotoViewModel> >(fotoDTOs);

            return(fotos);
        }