コード例 #1
0
        private AlbumSection CreateSection(VisitedPlace place)
        {
            AlbumSection vmodel = AutoMapper.Mapper.Map <AlbumSection>(place);

            var photos = _photoStore.GetPhotos().Where(p => p.PlaceId == place.Id).ToList();

            vmodel.Items = photos.Select(p => CreateAlbumItem(p)).ToList();
            return(vmodel);
        }
コード例 #2
0
        private AlbumSection CreateSection(Location location)
        {
            AlbumSection vmodel = AutoMapper.Mapper.Map <AlbumSection>(location);

            var photos = _photoStore.GetPhotosAtLocation(location.Id).ToList();

            vmodel.Items = photos.Select(p => CreateAlbumItem(p)).ToList();
            return(vmodel);
        }
コード例 #3
0
        private AlbumSection CreateSection(Destination destination)
        {
            AlbumSection vmodel = AutoMapper.Mapper.Map <AlbumSection>(destination);

            var photos = _photoStore.GetPhotos().Where(p => p.DestId == destination.Id).ToList();

            vmodel.Items = photos.Select(p => CreateAlbumItem(p)).ToList();

            return(vmodel);
        }