public IActionResult AddNewClinker(AddNewClinkerCommand newClinker) { var existingClinker = _repository.GetIdByClinkerName(newClinker.FirstName, newClinker.LastName, newClinker.PrisonTermEndDate); if (existingClinker == null) { var createdClinker = _repository.AddNewClinker(newClinker); return(Created("", createdClinker)); } else { return(BadRequest("Clinker already exists.")); } }