Пример #1
0
        public IActionResult GetById(int id)
        {
            var clinker = _repo.Get(id);

            if (clinker == null)
            {
                return(NotFound($"No clinker with Id {id} exists"));
            }
            return(Ok(clinker));
        }
Пример #2
0
        public IActionResult DeleteClinker(List <int> serialNumber)
        {
            var clinker = _repo.Get(serialNumber[0]);

            if (clinker == null)
            {
                return(NotFound("This clinker does not exist"));
            }
            else
            {
                _repo.RemoveAll(serialNumber[0]);
                _repo.RemoveClinker(serialNumber[0]);

                return(Ok(_repo.GetAll()));
            }
        }