public IActionResult Delete(int idAlbum, int id) { if (albumRepository.Obter(idAlbum) == null) { return(NotFound()); } musicaRepository.DeletarMusica(idAlbum, id); return(Ok()); }
public IActionResult Delete(int idAlbum, int id) { if (albumRepository.Obter(idAlbum) == null) { return(NotFound()); } var musicaCadastrada = musicaRepository.DeletarMusica(id); contexto.SaveChanges(); return(Ok(musicaCadastrada)); }