예제 #1
0
 public static dto::SongDTO Map(data::Song song)
 {
     return new dto::SongDTO
     {
         Id = song.Id,
         Title = song.Title,
         SongUrl = song.SongUrl,
         Author = AuthorMapper.Map(song.Author)
     };
 }
예제 #2
0
        public static dto::PlaylistDTO Map(data::Playlist playlist)
        {
            return new dto::PlaylistDTO
               {
               Id = playlist.Id,
               Name = playlist.Name,
               DateCreated = playlist.DateCreated,

               Songs = SongMapper.Map(playlist.Songs);
               };
        }
예제 #3
0
        public static dto::AuthorDTO Map(data::Author author)
        {
            return new dto::AuthorDTO
            {
                Id = author.Id,
                Name = author.Name,
                PhotoUrl = author.PhotoUrl,

                Songs = SongMapper.Map(author.Songs)
            };
        }