Пример #1
0
        public async Task <IActionResult> EditYoutube([FromBody] EditYoutube editYoutube)
        {
            //Debug.Print("EDITSONG");
            if (editYoutube.newYouTubeId != editYoutube.youTubeId)
            {
                await _songRepository.ChangeYouTubeId(editYoutube.name, editYoutube.youTubeId, editYoutube.newYouTubeId);

                await _movieRepository.ChangeYouTubeId(editYoutube.name, editYoutube.newYouTubeId);
            }
            if (editYoutube.newName != editYoutube.name)
            {
                await _songRepository.ChangeName(editYoutube.youTubeId, editYoutube.newName);

                await _movieRepository.ChangeName(editYoutube.youTubeId, editYoutube.newName);
            }
            return(Json(editYoutube));
        }