public IActionResult GetById(int id) { var clinker = _repo.Get(id); if (clinker == null) { return(NotFound($"No clinker with Id {id} exists")); } return(Ok(clinker)); }
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())); } }