Ejemplo n.º 1
0
        public ActionResult Create(CreatePlaylistVM vm)
        {
            if (Session[SessionKey.UserId] != null)
            {
                var playlist = new Playlist
                {
                    Name        = vm.Name,
                    CreatedDate = DateTime.Now,
                    Musics      = new List <Music>()
                };
                playlist.OwnerId = (Guid)Session[SessionKey.UserId];
                PlaylistDAO.CreatePlaylist(playlist);
            }

            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
 public static bool CreatePlaylist(Playlist pl)
 {
     return(PlaylistDAO.CreatePlaylist(pl));
 }