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