public PlayListResponse Add(AddPlayListRequest request, Guid idUsuario)
        {
            Usuario  usuario  = _repositoryUsuario.Obter(idUsuario);
            PlayList playList = new PlayList(request.Nome, usuario);

            AddNotifications(playList);

            if (this.IsInvalid())
            {
                return(null);
            }

            playList = _repositoryPlayList.Add(playList);

            return((PlayListResponse)playList);
        }
Beispiel #2
0
        public PlayListResponse AddPlayList(AddPlayListRequest request, Guid idUser)
        {
            User user = _repositoryUser.Get(idUser);

            PlayList playList = new PlayList(request.Name, user);

            AddNotifications(playList);

            if (this.IsInvalid())
            {
                return(null);
            }

            playList = _repositoryPlayList.Add(playList);

            return((PlayListResponse)playList);
        }