public IActionResult Post([FromBody] Model.tb_Gambar_DVD.GambarDVD_Class value) { var RP = new Model.tb_Gambar_DVD.GambarDVD_Repo(); try { RP.insertNewCover(value); return(Created("", value)); } catch (Exception e) { return(BadRequest()); } }
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)); } }