Esempio n. 1
0
        public IActionResult Delete(int id)
        {
            var RP    = new Model.tb_DVD.DVD_Repo();
            var value = new Model.tb_DVD.DVD_Class();


            if (RP.getById(id) != null)
            {
                RP.DeleteDVD(id);
                return(Ok("ID Terhapus"));
            }
            else
            {
                return(NotFound());
            }
        }
Esempio n. 2
0
        public IActionResult Get(int id)
        {
            var value = new Model.tb_DVD.DVD_Class();
            var RP    = new Model.tb_DVD.DVD_Repo();

            value = RP.getById(id);

            if (value != null)
            {
                return(Ok(value));
            }
            else
            {
                return(NotFound());
            }
        }