private IFoundViewModel GetPhotoFoundViewModel(IFound found) { var photoModel = (PhotoFound)found; AlbumModel album = _albumService.GetAlbum(photoModel.AlbumId); string albumName = album.Name; UserModel user = _userService.GetUser(photoModel.OwnerId); string userName = user.FirstName + " " + user.LastName; string thumbnailPath = pathUtil.BuildThumbnailPath(photoModel.OwnerId, photoModel.AlbumId, photoModel.Id, photoModel.Format, ImageSize.Medium); return(new PhotoFoundViewModel { ThumbnailPath = thumbnailPath, PhotoViewUrl = urlUtil.BuildPhotoViewUrl(photoModel.Id), AlbumName = albumName, AlbumViewUrl = urlUtil.BuildAlbumViewUrl(photoModel.AlbumId), UserName = userName, UserViewUrl = urlUtil.BuildUserViewUrl(photoModel.OwnerId), DateOfCreation = photoModel.DateOfCreation, Rating = photoModel.Rating }); }