public PlaylistWithTracksDto GetPlaylistWithTracks(int userId, string id) { var playlist = _playlistRepository.GetByUrlId(userId, id); if (playlist == null) { return(null); } var playlistDto = new PlaylistWithTracksDto { Name = playlist.Name, PlaylistId = playlist.Id, CreatorId = playlist.Creator.UserName, CreatorAlias = playlist.Creator.Alias, Tracks = GetPlaylistTrackListElementDtos(playlist.Id) }; return(playlistDto); }