Exemplo n.º 1
0
 public static Album MapAlbumModel(AlbumEntityModel album)
 {
     return(new Album
     {
         AlbumID = album.AlbumId,
         AlbumName = album.AlbumName,
         AlbumComment = album.Comment.Select(x => CommentsModelMapper.ModelToEntity(x)).ToList()
     });
 }
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()
     });
 }