Ejemplo n.º 1
0
        public void AddTrackToNewPlaylist(int trackId, string playlistName, int userId)
        {
            var user = _playlistRepository.GetById <User>(userId);

            var playlist = _playlistFactory.Produce(playlistName, user);

            playlist.UrlId = _playlistRepository.GenerateUrlId(playlist.Name, userId);

            _playlistRepository.Create(playlist);

            AddTrack(trackId, playlist.Id);
        }
 public Playlist Get(int id)
 {
     return(_repository.GetById(id));
 }
Ejemplo n.º 3
0
 public ActionResult Details(int id)
 {
     return(View(_repository.GetById(id)));
 }
Ejemplo n.º 4
0
 public Playlist GetById(string id)
 {
     return(_playlistRepository.GetById(id));
 }
        public PlaylistModelView GetById(long id)
        {
            var playlist = _playlistRepository.GetById(id);

            return(GetPlaylistModel(playlist));
        }