public IActionResult Post([FromBody] KrsDetail value)
        {
            KrsDetailRepo krsDetail = new KrsDetailRepo();
            var           feedback  = krsDetail.insert(value);

            return(Ok(feedback));
        }
        public IActionResult Put([FromBody] KrsDetail value)
        {
            KrsDetailRepo krs = new KrsDetailRepo();

            if (krs.update(value) == true)
            {
                return(Ok(value));
            }
            else
            {
                var response = new ContentResult()
                {
                    StatusCode = StatusCodes.Status404NotFound,
                };
                return(response);
            }
        }
        public IActionResult Get(int id)
        {
            KrsDetailRepo krs   = new KrsDetailRepo();
            var           hasil = krs.getById(id);

            if (hasil == null)
            {
                var response = new ContentResult()
                {
                    StatusCode = StatusCodes.Status204NoContent,
                };
                return(response);
            }
            else
            {
                return(Ok(hasil));
            }
        }
        public IActionResult Get()
        {
            KrsDetailRepo krsDetail     = new KrsDetailRepo();
            var           listKrsDetail = krsDetail.getAll();

            if (listKrsDetail == null)
            {
                var response = new ContentResult()
                {
                    StatusCode = StatusCodes.Status204NoContent,
                };
                return(response);
            }
            else
            {
                return(Ok(listKrsDetail));
            }
        }
        public IActionResult Delete(int id)
        {
            KrsDetailRepo krs = new KrsDetailRepo();
            KrsDetail     kr  = new KrsDetail();

            kr.Id = id;
            if (krs.delete(kr) == true)
            {
                return(Ok(kr));
            }
            else
            {
                var response = new ContentResult()
                {
                    StatusCode = StatusCodes.Status404NotFound,
                };
                return(response);
            }
        }