public ActionResult DeleteAudio(int idBook, int idAudioBook)
        {
            AudioBook audio = _audioBookService.GetAudioBookByID_Service(idBook, idAudioBook);

            _audioBookService.Delete(audio);
            //_audioBookService.Save();
            System.IO.File.Delete(Server.MapPath(audio.FileAudioPath));
            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
        public IActionResult Delete(Guid id)
        {
            try
            {
                _audioBookService.Delete(id);
            }
            catch (Exception e)
            {
                return(NotFound());
            }

            return(Ok());
        }