public IActionResult AddService(int id, Service serviceToAdd) { var clinkerToUpdate = _repository.GetById(id); if (!clinkerToUpdate.Services.Any(s => s.Title == serviceToAdd.Title)) { _repository.AddClinkerService(id, serviceToAdd); } else { return(BadRequest("Service already exists")); } var updatedClinker = _repository.GetById(id); return(Ok(updatedClinker)); }