public IActionResult Delete(string icuId) { try { _configurationRepository.RemoveIcu(icuId); return(Ok()); } catch { return(BadRequest()); } }
public ActionResult DeleteIcu(string id) { var IcuModelFromRepository = _repository.GetIcuById(id); if (IcuModelFromRepository == null) { return(NotFound()); } _repository.RemoveIcu(IcuModelFromRepository); _repository.SaveChanges(); return(Ok()); }