Пример #1
0
 public static PhotoBookDto ToPhotoBookDto(this DataManager.Models.PhotoBook photoBook)
 {
     return(new PhotoBookDto
     {
         Id = photoBook.Id,
         TimeFrame = photoBook.TimeFrame,
         Title = photoBook.Title,
         NumPhotos = photoBook.Photos.Count,
         Whitelist = photoBook.Whitelist,
         Blacklist = photoBook.Blacklist
     });
 }
Пример #2
0
 public static PhotoBookWithPhotosDto ToPhotoBookWithPhotosDto(this DataManager.Models.PhotoBook photoBook)
 {
     return(new PhotoBookWithPhotosDto
     {
         Id = photoBook.Id,
         TimeFrame = photoBook.TimeFrame,
         Title = photoBook.Title,
         NumPhotos = photoBook.Photos.Count,
         Whitelist = photoBook.Whitelist,
         Blacklist = photoBook.Blacklist,
         //Photos = photoBook.Photos.Select(p=> p.Thumbnail.ToImageDto()).ToList()
     });
 }