Exemple #1
0
 public static AlbumModel MapAlbumModel(AlbumClass album)
 {
     return(new AlbumModel
     {
         AlbumId = album.AlbumId,
         AlbumName = album.AlbumName,
         AComment = album.Comment.Select(x => CommentsModelMapping.ModelToEntity(x)).ToList()
     });
 }
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()
     });
 }