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")); }
public IActionResult Delete(Guid id) { try { _audioBookService.Delete(id); } catch (Exception e) { return(NotFound()); } return(Ok()); }