Exemplo n.º 1
0
 public static PhotoEntityModel MapPhotoEntityModel(Photo photo)
 {
     return(new PhotoEntityModel
     {
         PhotoId = photo.PhotoID,
         PhotoName = photo.PhotoName,
         Comment = PhotoModelMapper.MapCommentsEntityModel(photo.PhotoComment),
         //AlbumID=photo.AlbumID
     });
 }
Exemplo n.º 2
0
 public static AlbumEntityModel MapAlbumEntityModel(Album album)
 {
     return(new AlbumEntityModel
     {
         AlbumId = album.AlbumID,
         AlbumName = album.AlbumName,
         Comment = album.AlbumComment.Select(x => CommentsModelMapper.EntityToModel(x)).ToList(),
         Photo = album.Photos.Select(x => PhotoModelMapper.EntityToModel(x)).ToList()
     });
 }