Ejemplo n.º 1
0
 public static PhotoEntityModel MapPhotoEntityModel(Photo photo)
 {
     return(new PhotoEntityModel
     {
         PhotoId = photo.PhotoID,
         PhotoName = photo.PhotoName,
         Comment = PhotoModelMapping.MapCommentEntityModel(photo.PhotoComment)
     });
 }
Ejemplo n.º 2
0
 public static Photo MapPhotoModel(PhotoEntityModel photo)
 {
     return(new Photo
     {
         PhotoID = photo.PhotoId,
         PhotoName = photo.PhotoName,
         PhotoComment = PhotoModelMapping.MapCommentModel(photo.Comment),
     });
 }
Ejemplo n.º 3
0
 public static AlbumEntityModel MapAlbumEntityModel(Album album)
 {
     return(new AlbumEntityModel
     {
         AlbumId = album.AlbumID,
         AlbumName = album.AlbumName,
         Comment = album.AlbumComments.Select(x => CommentModelMapping.EntityToModel(x)).ToList(),
         Photo = album.Photos.Select(x => PhotoModelMapping.EntityToModel(x)).ToList()
     });
 }