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