public static PhotoClass MapPhotoEntityModel(PhotoModel photo)
 {
     return(new PhotoClass
     {
         PhotoId = photo.PhotoId,
         PhotoName = photo.PhotoName,
         PComment = PhotoModelMapping.MapCommentsEntityModel(photo.PComment),
     });
 }
Exemple #2
0
 public static AlbumClass MapAlbumEntityModel(AlbumModel album)
 {
     return(new AlbumClass
     {
         AlbumId = album.AlbumId,
         AlbumName = album.AlbumName,
         Comment = album.AComment.Select(x => CommentsModelMapping.entitymodel(x)).ToList(),
         Photo = album.Photo.Select(x => PhotoModelMapping.EntityToModel(x)).ToList()
     });
 }
Exemple #3
0
 public static PhotoModel MapPhotoModel(PhotoClass photo)
 {
     return(new PhotoModel
     {
         PhotoId = photo.PhotoId,
         PhotoName = photo.PhotoName,
         PComment = PhotoModelMapping.MapCommentsModel(photo.PComment),
         //AlbumID = photo.AlbumID
     });
 }