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); }
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); }
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); }