public IActionResult Delete(int id) { var RP = new Model.tb_Gambar_DVD.GambarDVD_Repo(); var value = new Model.tb_Gambar_DVD.GambarDVD_Repo(); if (RP.getCoverByIDDVD(id) != null) { RP.deleteCoverById(id); return(Ok("ID Terhapus")); } else { return(NotFound()); } }
public IActionResult GetByDVD(int id) { var cover = new Model.tb_Gambar_DVD.GambarDVD_Class(); var repositorycover = new Model.tb_Gambar_DVD.GambarDVD_Repo(); try { cover = repositorycover.getCoverByIDDVD(id); } catch (Exception ex) { } if (cover == null) { return(NotFound()); } else { return(Ok(cover)); } }